Skip to content
TypewrightMARKDOWN + MDX EDITOR · v0.1 · MIT CORE

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 docs
field-notes.md — Typewright
412 words · saved

Field 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)
enginedepsper-keystroke
typewright0one block
0runtime dependencies in the core engine
1block re-parsed per keystroke, never the whole document
138unit and end-to-end tests, plus an adversarial security review
4modes (edit, unified, preview, read), one string of truth

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'
STREAMING · anticipate: true

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

⌘B bold⌘I italic⌘K link⌘E code

  1. 01

    Unified source reveal. Formatting renders inline; raw markers appear only around your caret. Try it in the demo above.

  2. 02

    Semantic folding. Fold a heading and everything beneath it collapses to the next peer. It walks the parse tree, never a regex.

  3. 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.

01

Smart lists & tasks

Enter continues the list, Tab nests, Shift-Tab lifts. Checkboxes toggle with a click, and renumbering just happens.

02

Find & replace, scoped

Plain or regex, whole-word, case-aware, across the whole document or inside one folded section.

03

Smart paste

Rich HTML pastes as clean Markdown; code pastes into fences with the language guessed for you.

04

Footnotes & autolinks

GFM footnotes you can hop to and back from, bare URLs linkified, reference links resolved live.

05

Document outline

A live heading tree with word counts per section. Click to jump, drag to restructure.

06

Alerts & callouts

GitHub-style NOTE / TIP / WARNING blockquotes render as quiet, typographic callouts.

PRICING

The engine is free. The workflows are Pro.

CoreMIT · FREE FOREVER
$0

  • 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
ProPRO
$12per editor / month

  • 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.

Field Notes, July
MACOS
Field Notes
IOS

GET IN TOUCH

Building an editor on Typewright?

Tell us what you're building. We answer every note, usually within a day.

Send message