Skip to main content
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

The onEditorCreate callback now provides a proxied editor that warns when deprecated properties are accessed. All Document API operations work without warnings:

Driving custom React UI

If your migration is also moving the UI side off legacy chains, the destination is superdoc/ui/react. Replace superdoc.on('editor-update', ...) loops and useState(superdoc.activeEditor.commands.X) patterns with the typed hooks: useSuperDocCommand, useSuperDocSelection, useSuperDocComments, useSuperDocTrackChanges, useSuperDocDocument. See Custom UI for the full surface and the reference workspace on GitHub.

Full reference

See Available Operations for the complete mapping of all 300+ operations, and the Document API Reference for detailed input/output schemas.

Need help?