The Three Views
Slate shows a Markdown document three ways. Pick the view that fits what you are doing, or split the window to write and preview at once. Code and text files open in the plain-text view on its own.
Plain-text view
The plain-text view is the editor at the heart of Slate, built on CodeMirror 6. It shows your file exactly as it lives on disk and adds syntax coloring so the structure is easy to see, without hiding any characters. For Markdown that means headings start with #, bold is **bold**, and links are [text](url).
It is not only for Markdown. Open a source file (TypeScript, Python, Rust, Go, and many more), a config file (JSON, YAML, TOML), or any plain text, and the plain-text view highlights it in that language. For those files it is the whole editor: the WYSIWYG and Reading views below are specific to Markdown, so the view switcher does not appear for code and text files. You still get the sidebar, search, tabs, the outline, and the command palette.
WYSIWYG view
For Markdown documents, 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.
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.
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.
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. It appears for Markdown documents; code and text files use the plain-text view on its own, so the switcher is hidden for them.
Keyboard shortcuts let you switch without leaving the keys:
- Ctrl⌘1Ctrl⇧1Plain
- Ctrl⌘2Ctrl⇧2WYSIWYG
- Ctrl⌘3Ctrl⇧3Reading
- ⌘\Ctrl\Toggle split
View switching deliberately holds Control along with the number so it never clashes with the heading shortcuts the editor already uses. Plain ⌘1Ctrl1 through ⌘6Ctrl6 set heading levels one through six, so the views take a different chord on every platform.
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
A document is one source string, and each view is a projection of it. For Markdown, that string drives all three views: type in one and Slate updates the underlying string, then refreshes the others 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.