[markdown mode] Fix HTML embedding, add innerMode method

Closes #2083
Issue #2084