Stesura
Stesura is a modular, page-aware document editor built on ProseMirror with first-class collaboration and a feature-extension system for things like pagination, footnotes, cross-references, comments, track changes, proofreading, and DOCX import/export.
Architecture at a glance
The editor is intentionally split so that document state, transport, and UI are independently swappable.
| Layer | Owner | Packages |
|---|---|---|
| Schema, plugins, commands | core | @stesura/core |
| ProseMirror view + UI shell | editor-react | @stesura/editor-react |
| Collaboration transport (recommended) | collab adapter | @stesura/collab-adapter(-react/-server/-local) |
| Feature packs (each is opt-in) | per-feature | @stesura/pagination(-react), @stesura/references(-react), @stesura/track-changes(-react), @stesura/comments(-react), @stesura/proofread(-react), @stesura/docx(-react), @stesura/ai(-react/-server) |
The single React component you mount is StesuraEditor from @stesura/editor-react. It does not own document state — you pass it an EditorState and a dispatchTransaction, both produced by a mount hook. Every mount hook returns the same { editorState, dispatch, pluginFactory, schema } shape, so you can swap the backend without touching the editor, the plugins, or the UI extensions:
useLocalEditorfrom@stesura/editor-react/hooks— in-memory, no backend.useLocalCollabEditorfrom@stesura/collab-adapter-react— offline persistence in one browser (IndexedDB + BroadcastChannel).useCollabEditorfrom@stesura/collab-adapter-react— real-time multi-user collaboration against your own backend.
Where to go next
- Getting Started — the same three mounts, incrementally.
- Collaboration — Pitter Patter architecture, rooms, server edits;
- Plugins —
stesuraPlugins, feature plugins. - Customizing the Toolbar — tabs, extensions, UI extensions.
- AI — text actions, tab autocomplete, document chat.
- Packages — per-package reference.
Live examples
Runnable demos for each mount — the code lives in apps/demo.
- In-memory — local state, no persistence.
- IndexedDB — single-user offline-first.
- Pitter Patter — real-time collaboration with comments.
- All examples — index.