editor.commands, editor.state, editor.view, and direct ProseMirror access are deprecated and will be removed in a future version. The Document API (editor.doc) is the replacement for all programmatic document operations.
Why migrate
- Stable contract — the Document API is versioned and engine-agnostic. It will survive the ProseMirror removal.
- 300+ operations — formatting, comments, tables, track changes, lists, images, sections, and more.
- Works everywhere — same operations available in the browser, Node.js SDK, Python SDK, and CLI.
Quick comparison
Common migrations
Reading document content
Finding and replacing text
Formatting
Comments
Track changes
Tables
Lists
History
Images
Accessing the editor from callbacks
TheonEditorCreate callback now provides a proxied editor that warns when deprecated properties are accessed. All Document API operations work without warnings:

