Markdown, at the speed of thought.
A GFM + MDX engine built from scratch, with zero runtime dependencies and no framework on the keystroke path. Every edit re-parses one block, never the whole document, so the preview is simply there.
npm install typewrightRead the docsField Notes — July
The incremental parser finishes a re-tokenize before the next keystroke lands. State is a string; the AST carries exact source offsets, so nothing ever drifts.
↑ CLICK THE BLOCK — SOURCE REVEALS AT THE CARET
- Ship the anticipation renderer
- Fold menu (H1–H6, fold all)
| engine | deps | per-keystroke |
|---|---|---|
| typewright | 0 | one block |
STREAMING PREVIEW
Renders the answer while the model is still thinking.
Feed it an LLM token stream and Typewright anticipatesthe formatting that hasn't landed yet: a half-typed **boreads as bold in progress, an unterminated fence opens a live code block. Content that's already confirmed never reflows.
import { pipeStream } from 'typewright/streaming'The renderer commits each block once — then **antic what's still arriving.
```ts
const view = new EditorView({ mode: 'unified' })await pipeStream(result.textStream, controller)
KEYBOARD-FIRST
- 01
Unified source reveal. Formatting renders inline; raw markers appear only around your caret. Try it in the demo above.
- 02
Semantic folding. Fold a heading and everything beneath it collapses to the next peer. It walks the parse tree, never a regex.
- 03
Sanitising by construction. Every URL passes a scheme allowlist; raw HTML and MDX render escaped. It's XSS-tested and Electron-safe.
THE EDITING MODEL
A live preview that gets out of the way.
The Markdown string is always the source of truth. Click any block to edit its source in place, then blur to re-render. Rows animate into their new positions; no jump, no lost caret.
EVERYDAY CRAFT
The small things, done properly.
Smart lists & tasks
Enter continues the list, Tab nests, Shift-Tab lifts. Checkboxes toggle with a click, and renumbering just happens.
Find & replace, scoped
Plain or regex, whole-word, case-aware, across the whole document or inside one folded section.
Smart paste
Rich HTML pastes as clean Markdown; code pastes into fences with the language guessed for you.
Footnotes & autolinks
GFM footnotes you can hop to and back from, bare URLs linkified, reference links resolved live.
Document outline
A live heading tree with word counts per section. Click to jump, drag to restructure.
Alerts & callouts
GitHub-style NOTE / TIP / WARNING blockquotes render as quiet, typographic callouts.
PRICING
The engine is free. The workflows are Pro.
- Full CommonMark + GFM parser with an offset-exact AST
- All four modes, including the unified live preview
- Streaming preview that anticipates
- Semantic heading folding
- Toolbar plus a pure command engine
- Light, dark and auto theming via CSS tokens
- Sanitising, XSS-safe renderer
- Everything in Core
- MDX component execution, sandboxed and Electron-safe
- Mermaid diagrams and math typesetting
- In-place WYSIWYG table grid
- Real-time collaboration: comments, presence, live cursors
- Version history
- Syntax-coloured code blocks, plus priority support
GOING NATIVE
Swift-native on macOS, iOS and iPadOS.
The same document model, re-implemented in Swift. No web view, no bridge tax. Your files stay plain .md, synced or not. It's coming with Typewright 1.0.
GET IN TOUCH
Building an editor on Typewright?
Tell us what you're building. We answer every note, usually within a day.