Markdown, diagrams & preview
Editora renders Markdown natively (no embedded browser) and gives Markdown files a few editing aids on top.
Live preview
Markdown files get an IntelliJ-style 3-mode view from a floating control at the top-right of the editor:
- Editor: just the source.
- Split: source on the left, preview on the right.
- Preview: the rendered page only.
In Split the two sides scroll together. In Preview the page keeps its own scroll position.
The preview is built from CommonMark + GFM and aims to match GitHub: real task-list checkboxes, inline-code pills, underlined headings, tables, and images (local and remote, including SVG badges). It updates live as you type, follows the active theme or its own light/dark toggle, and remembers its mode per file.
Beyond GFM it also renders YAML front matter (as a metadata block),
footnotes, heading anchors, and ++inserted++ text, and the
Structure tool window shows the document’s #…###### heading outline for quick
navigation.
The parser caps pathological input (table cells, block nesting and inline nesting), because the editor renders whatever file you open. The nesting limits degrade to plain text; the table cap is reachable by a legitimate file (a 2.3 MB Markdown table trips it, well under the 5 MB point where the preview switches off anyway), and the preview reports that rather than going blank.
Zoom with the − / + control or Ctrl+wheel. In Preview mode, Space /
PageDown and Backspace / PageUp scroll the page, and a right-click
menu offers Select All, Copy, Export to PDF, and Print. A link in the preview
is clickable and shows a hand cursor. http, https, and mailto links open
in your system browser or mail client; a relative or file: link opens inside
Editora when it points at a file in the project or the document’s folder. Any
other link is refused with a status message.
The format bar
Select text in a Markdown file and a small format bar appears above the
selection with bold, italic, strikethrough, inline code, link, list, and a
heading level picker. The same actions are commands with Emacs markdown-mode
chords:
| Action | Command | Emacs key |
|---|---|---|
| Bold / italic / strike / code | markdown.bold … | C-c C-s b/i/s/c |
| Insert link | markdown.link | C-c C-a l |
| Promote / demote heading | markdown.headingPromote / Demote | C-c C-h p / d |
| Open link under caret | markdown.openLink | C-c C-o |
| Reflow table | markdown.reflowTable | C-c C-s t |
List and quote continuation happens automatically on Enter. Ctrl/Cmd-click opens
a link. The format bar can be turned off in Settings → Markdown → Editing
(or with markdown.toggleFormatBar).
You can also insert a table of contents (markdown.toc) and a task list
(markdown.taskList, C-c C-s k).
Tables
Markdown’s editing actions sit under a single Markdown submenu in the editor’s right-click menu. Listed flat, the seven entries would push cut, copy, paste and the spelling suggestions well down the menu, and would make file-type actions read as ordinary editing ones. The Table submenu stays nested inside it.
Beyond the format bar’s reflow, the right-click Table submenu (and the
palette) edits the table under the cursor: insert a table
(markdown.insertTable), add / delete rows and columns
(markdown.tableAddRow / tableAddColumn / tableDeleteRow /
tableDeleteColumn), and Tab moves between cells with Enter adding a row.
Tables interoperate with CSV and spreadsheets:
- Convert to and from CSV (
markdown.tableToCsv/markdown.tableFromCsv, delimiter auto-detected, RFC-4180 quoting). - Export the table to a CSV, Excel (
.xlsx), or ODF (.ods) file (markdown.tableExportCsv/tableExportExcel/tableExportOds).
See CSV & TSV for editing data files directly.
Linting, math, and editing aids
- Linting: a broad slice of the markdownlint rule set (heading-level
increment, hard tabs, blank-line and spacing rules, bare URLs, trailing
punctuation, first-line H1, and more) shows as inline squiggles with hover
messages, scrollbar and minimap stripes, and a Markdown Lint tool
window. Auto-fix (
markdownLint.fix) corrects the safely-mechanical issues in one undoable edit. Turn individual rules off in Settings → Markdown → Linting or withmarkdownLint.toggleRule, use inline<!-- markdownlint-disable -->comments, or a nearest.markdownlint.json. On by default; toggle with View: Toggle Markdown Lint. - LaTeX math: render inline
$…$and display$$…$$math in the preview (and in PDF export) via JLaTeXMath, with GitHub-style delimiter rules so prose dollar amounts are left alone. On by default; toggle it in Settings → Markdown → Preview & PDF (Render LaTeX math) or with View: Toggle Math Rendering (view.toggleMath). - Image paste and drag-drop: paste an image from the clipboard, or drop image
files onto a saved Markdown buffer, and the file is written into a sibling
assets/folder with thelink inserted. - Smart link paste: paste a URL over a selection to wrap it as
[selection](url). - Table editing: Tab / Shift-Tab move between pipe-table cells, and Enter on the last row adds a row, reflowing as you go.
Mermaid diagrams
Mermaid renders inline. A fenced ```mermaid block in Markdown becomes a
diagram in the preview, and standalone .mmd files get the same 3-mode preview.
Mermaid is on by default, self-gating on detection, so it stays inert until
the mmdc (mermaid-cli) command is found. Install it with
npm i -g @mermaid-js/mermaid-cli (it needs Node.js) or the in-app
Install… button in Settings → Mermaid (install.mermaidSupport). The
same page holds the toggle and the two tool paths: a blank mmdc path resolves
mmdc on your PATH, and a blank maid path (the optional linter) runs it
through npx.
mmdc drives a headless Chrome. If rendering fails with “Could not find
Chrome”, install it once with
npx puppeteer browsers install chrome-headless-shell; the in-app installer
does this for you.
Rendering uses mmdc and is cached per diagram; .mmd files get live linting
that underlines errors with precise line and column messages. Export a diagram
to SVG, PNG, or PDF with mermaid.export.
HTML live preview
On any .html / .htm / .xhtml file, a floating globe button opens it in a
detected browser (Safari, Chrome, Firefox, Edge, or the system default), served
over a tiny loopback-only web server with live reload as you type. Sibling CSS,
JS, and images load from disk. The server answers only its own browser tab and
refuses to serve a home directory or a drive root.
It’s on by default; toggle it in Settings → Web → HTML Preview or with
View: Toggle HTML Live Preview. The file must be saved so its assets resolve,
and remote (SFTP) files are excluded. Commands: htmlPreview.open and
htmlPreview.openIn (pick a browser).
Export and print
Export code to a syntax-highlighted PDF, or the Markdown / Mermaid preview to a
richly formatted PDF with headings, lists, tables, code blocks, and images as
native vector text. In the palette these are File: Export to PDF… for the
source text and File: Export Rendered Preview to PDF… for the formatted
document, with File: Print… and File: Print Rendered Preview… beside them.
You can also export a Markdown file’s preview to a
standalone, self-contained .html file (embedded stylesheet, heading
anchors, math as images) with Preview: Export to HTML, which opens the result
in a new tab, or to MS Word (.docx) and OpenDocument Text (.odt) with
File: Export Preview to Word (.docx) and File: Export Preview to OpenDocument
(.odt). Headings, styling, lists, tables,
code, math, Mermaid diagrams, and images all carry over. Or print either, with a
page-by-page preview first (what you preview is what prints). Output is always
light-themed and generated off the UI thread.
A Markdown PDF or printout contains:
- Tables with bold, code and links kept inside cells, their column alignment, columns sized to their content, and the header row repeated on each page.
- Task lists with their checkboxes, and
~~strikethrough~~struck through. - Fenced code in a monospaced font, syntax-coloured by its language, with every line printed however long the block is.
- Images, including badges inside a line of text, plus math and Mermaid diagrams at the size of the surrounding text rather than blown up to a page. An image that cannot be loaded prints its alt text.
- In the PDF, clickable links (web, mail, and
#headinglinks within the document), bookmarks built from the headings, and a title, creator and date. On paper, a link shows its address.
Commands: editor.exportPdf, preview.exportPdf, preview.exportHtml,
preview.exportDocx, preview.exportOdt, editor.print, preview.print. Line
numbers, syntax highlighting, the page footer, and the PDF page size,
orientation and margins live in Settings → Editor → Export & Print. The
print preview, the Save dialog and what each setting applies to are described in
Print & PDF export.
Long documents
Printed Markdown fills each page. A long list, quote, code block, table or paragraph starts on the current page and continues onto the next rather than jumping to a fresh page, and a heading stays with the text that follows it. Long inline code wraps instead of running off the page. A table splits between rows and repeats its header.
The text stays vector rather than being sliced as an image, so it is crisp on paper. Long runs are cut at whitespace and no word is broken.
A document that is mostly one very long list therefore prints on as many pages as its text needs, at full size. Nothing is shrunk to fit except a single block, such as an oversized image, that cannot be split.