Why We Built a Split View Markdown Editor

Most markdown editors make you choose between editing and previewing. With mdMD's split view, you see your raw source and styled output side by side in real time.

Why We Built a Split View Markdown Editor

There are two schools of thought when it comes to markdown editing. Some editors show you raw text and let you preview separately. Others try to render inline, turning your **bold** into bold as you type and hiding the syntax.

We think both approaches have problems. Raw-only editing means you’re constantly switching between edit and preview to check your formatting. Inline rendering hides the markdown itself, which defeats the purpose of writing in a plain-text format.

The best of both worlds

mdMD takes a different approach: split view. Your raw markdown source lives on the left, and a styled preview appears on the right. Both update in real time as you type.

This means you always see exactly what you’re writing (the actual markdown characters) while simultaneously seeing how it renders. No guessing, no toggling, no surprises.

How it works under the hood

The split view is powered by the swift-markdown parser, which builds an abstract syntax tree (AST) from your document. As you type, the parser re-processes the document and the preview pane re-renders instantly.

On the editing side, we use a custom NSTextStorage subclass that applies syntax highlighting based on the same AST. Headers get larger, bold text gets bold, code gets a monospace font, all while keeping the raw markdown characters visible.

When to use split view

Split view is the default mode in mdMD, but you can toggle it off if you prefer a focused editing experience. We find it’s particularly useful when:

  • Writing documents with complex formatting (nested lists, tables, code blocks)
  • Checking that your links and images render correctly
  • Working on documents that will be shared with others

Download mdMD and try it for yourself. We think you’ll love seeing your markdown come alive as you write.