Markdown and the Visual Editor

Switch between plain-text Markdown and a visual view of the same file.

Any .md file can be edited in two ways: as plain text in the source editor, or as formatted text in the visual editor. Both edit the same Markdown file. For the syntax and how it compiles, see The hybrid format.

Switching views

When a Markdown file is open, a small two-button switch appears in the editor toolbar. It is hidden for .tex files.

  • Source Code shows the raw Markdown in the code editor.
  • Visual (WYSIWYG) shows formatted text.

Hover over the buttons to see their names. TeXposit remembers your last choice for the project. A .doc.md file always opens in the visual editor.

Switching does not lose content, but the text may be normalised. List markers and blank-line spacing can change slightly when a file passes through the visual editor.

Formatting in the visual editor

While the visual editor is active, the Format menu applies:

  • bold, italic, underline and strikethrough
  • subscript and superscript
  • text alignment
  • task lists

The Insert menu adds images, tables, citations, page breaks and footnotes. Citations insert as [@key], the Markdown citation syntax.

Math

Math is rendered in the visual editor. $...$ and $$...$$ appear as typeset equations, and an invalid expression shows the raw source instead of breaking the page. Click an equation to edit its source in a small popover with a live preview. Press Esc or click outside to apply the change.

YAML header

The --- block at the top of a file holds the title, author and abstract. Edit it in the source view. The visual editor shows only the document body, and the block is kept intact when you switch.

What compiles

Compilation always uses the saved Markdown, not whichever view is showing.