The Three Views

Slate shows the same document in three ways. Pick the view that fits what you are doing, or split the window to write and preview at once.

Plain-text view

The plain-text view is a Markdown source editor built on CodeMirror 6. It shows your file exactly as it lives on disk: headings start with #, bold is **bold**, and links are [text](url). The editor adds syntax coloring so the structure is easy to see, but it does not hide any characters.

Choose this view when you want precise control over Markdown formatting, when you are pasting in a chunk of YAML, or when you are working with a file that mixes Markdown and fenced code. Fenced code blocks carry their own syntax coloring here, so source-heavy documents stay readable.

Plain-text view
# Hello Slate
This is **bold** and *italic* text.
> A blockquote.

WYSIWYG view

The WYSIWYG view shows your document as if it were already rendered, while still being fully editable. Bold appears as bold, headings appear as headings, and lists indent themselves. Behind the scenes Slate converts what you type back into standard Markdown and saves that to your file.

Type / on an empty line to open the slash menu, which lets you insert blocks like tables, code, callouts, and math without remembering the syntax.

WYSIWYG view
Hello Slate
This is bold and italic text.
A blockquote.

Reading view

Reading view is the finished page. It is read-only, uses a measure and rhythm tuned for long-form reading, and renders everything Slate knows how to render: syntax-highlighted code, math, Mermaid diagrams, images, callouts, and tables. This is where code and rich content stop being source and start being the real thing.

Use this view to review a document, to read someone else's notes, or when you want to focus on the content without seeing any controls. Switch back to Plain or WYSIWYG when you want to edit again, and the change is instant.

Reading view
Hello Slate
This is bold and italic text.
A blockquote.

Split view

Split view places an editor on the left and a live rendered preview on the right, so you can write Markdown and watch it become prose at the same time. You can split with either the Plain or WYSIWYG editor as the left pane. The Reading view is the preview itself, so splitting it would be redundant.

A draggable divider sits between the two panes. Pull it left or right to give one pane more room. Slate remembers the ratio per window.

Split toggle
Split
Off
Single editor fills the area.
Split
On
Editor on the left, preview on the right.

Editor and preview keep their scroll positions roughly in sync. Scroll one and the other follows. See scroll sync on the Navigation page for how that works and its limits on very long files.

Switching views

The view switcher is the segmented control in the top-right of the editor. Click any of the three labels to switch. The active view is highlighted.

The view switcher in each of its three states
PlainWYSIWYGReading
Plain active
PlainWYSIWYGReading
WYSIWYG active
PlainWYSIWYGReading
Reading active

Keyboard shortcuts let you switch without leaving the keys:

  • 1Ctrl1Plain
  • 2Ctrl2WYSIWYG
  • 3Ctrl3Reading
  • \Ctrl\Toggle split

The same switch is one slash command away from the command palette: /view plaintext, /view wysiwyg, /view rendered, or /split to toggle the split.

How views stay in sync

The document is one Markdown string. Each view is a projection of that string. When you type in a view, Slate updates the underlying string and then refreshes the other views from it. The active view writes; the others re-derive. Rendering keeps up as you go, so there is no lag between editing and seeing the result.

Updates run on a short delay, around a tenth of a second, so a burst of keystrokes turns into one update instead of many. You will not see flicker, and views never fight each other.

Per-tab view state

Each open tab remembers which view it is in and where it was scrolled. If you have spec.md open in WYSIWYG and notes.md open in Reading, switching between tabs respects both choices. Closing and reopening Slate restores the same set.

That makes it natural to keep a few documents open at once with different working modes. A draft can sit in WYSIWYG while a reference document is in Reading next to it.