client.mountEditor(el, options). el is an Element
or a CSS selector string. It returns an EditorInstance for
imperative control.
EditorMountOptions
Existing document id to load. Omit to lazy-create a document on the first
content change — the new id arrives via
onDocumentCreated.Initial content (TipTap JSON) when not loading from a
documentId — in-memory
editing.Editor UI and content language/direction.
Color theme. Can be changed live via
setTheme.Start read-only. Editing can be toggled later via
setEditable().Autosave behavior. See Types. Set
{ enabled: false } to drive persistence yourself via save().Callbacks
Fired once the editor is mounted and (if loading) the document is in.
Fired on every content change with the current TipTap JSON.
Fired when autosave transitions between
idle | saving | saved | error.Fired with the new id when a document is lazy-created.
Fired on recoverable/unrecoverable errors with a stable
error code.
Fired when a forced token refresh fails; autosave pauses until recovery.
Analytics passthrough for editor interaction events.
EditorInstance
The object returned bymountEditor:
Current editor content (TipTap JSON).
Force an immediate save of any pending changes.
Toggle read-only / editable live.
Switch theme (
"light" | "dark") live.Tear down the editor and release the shared overlay root. Call this on unmount.
