Editora 0.19.0 docs. You are reading an archived version, kept so links from that release keep working. Read the 0.21.0 docs →

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.

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:

ActionCommandEmacs key
Bold / italic / strike / codemarkdown.bold …C-c C-s b/i/s/c
Insert linkmarkdown.linkC-c C-a l
Promote / demote headingmarkdown.headingPromote / DemoteC-c C-h p / d
Open link under caretmarkdown.openLinkC-c C-o
Reflow tablemarkdown.reflowTableC-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 with markdownLint.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 the ![](…) link 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. 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.

Commands: editor.exportPdf, preview.exportPdf, preview.exportHtml, preview.exportDocx, preview.exportOdt, editor.print, preview.print. Line numbers, syntax highlighting, and page size live in Settings → Editor → Export & Print.

Long documents

Pagination splits on whole blocks, so nothing breaks across a page edge. Giving a block taller than a page a page of its own, scaled uniformly to fit, is right for an oversized image but wrong for text, because a Markdown list is one top-level block however long it is.

An over-tall container is therefore regrouped into copies of itself holding as many children as fit: a long list becomes several lists, a long paragraph several paragraphs, each carrying the original’s styling so it renders identically. The text stays vector rather than being sliced as an image, so it is crisp on paper; the cost is a seam that does not hang-indent. Uniform scaling applies only to an atomic over-tall block. A plain paragraph has no emphasis to split at, so 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.