Documentation

Note Editor Preview Mode

An Obsidian-style Source/Preview toggle for the note editor at /admin/notes — rendered, editable markdown with a remembered per-user mode.

The note editor at /admin/notes/<id> has a Source/Preview toggle, the same idea as Obsidian's live preview. Source is the raw markdown textarea, unchanged. Preview renders the same note as formatted, editable content: headings, lists, task checkboxes, tables, links, and code all show the way they will look, and you can keep typing directly in that view.

Switching modes

  • Click Source or Preview in the toolbar above the markdown field.
  • Press Cmd+E (macOS) or Ctrl+E (Windows/Linux) to toggle from anywhere on the page.
  • Whichever mode you used last is remembered per user and restored the next time you open any note, on any device you sign in on.

Saving works exactly the same in both modes. Preview edits flow into the same content_markdown field as Source, so the Save button (and anything else that reads a note's body) sees no difference between a note edited in Source and one edited in Preview.

What renders, and what doesn't

Preview is built for the markdown you'd actually write in a note: headings, bullet and numbered lists, task checkboxes, tables (including column alignment), links, inline code, and fenced code blocks. Clicking a link always opens it in a new tab — rather than placing a cursor inside it — so it never risks discarding an unsaved edit elsewhere in the note by navigating away from the page. Clicking a checkbox toggles it and rewrites the underlying - [ ] / - [x] marker immediately.

The first edit to a note can normalize formatting elsewhere in it: toggling a bullet's marker character to *, straightening table cell padding, or rewriting _em_ to *em*. The note's content is unchanged; only its exact punctuation is. Untouched notes always round-trip byte-for-byte, which is what matters for a note you're only reading.

Three Obsidian-specific constructs are intentionally not parsed into the rich view: YAML frontmatter, callouts (> [!note]), and dataviewjs fences. Reinterpreting those through a generic markdown parser risks silently rewriting them — a different quote style, a collapsed blank line, a reordered attribute — and nothing would tell you. Instead, Preview shows them as a preserved block and leaves them alone; toggle back to Source to edit one directly. Because they're never re-parsed, a note built from any of these round-trips through Preview byte-for-byte as long as you don't touch that block.

Why this exists

The note editor's only view used to be a plain markdown textarea. That's fine for quick edits, but it means reading or lightly editing a long note means reading raw markdown syntax the whole time — exactly the gap Obsidian's live preview closes for the vault these notes sync to.

Related

Want this page as machine-readable markdown? GET /docs/features/note-editor-preview-mode.md