Skip to main content
Every piece of UI the SDK draws around the document is optional, and everything those controls do is reachable from the handle. The rule: the SDK owns the document, not your product.

What is optional

The comments panel has no built-in button at all: comment chips render inline next to the page, and the host opens or closes the panel wherever its own UI calls for it.

A host-rendered toolbar

Set toolbarMode="none", subscribe to toolbar state, and render whatever you like:
ReviseToolbarState publishes everything a toolbar needs to render itself: ready, readOnly, documentMode, hasSelection, canUndo/canRedo, the formatting marks at the caret, heading, alignment, lineSpacing, fontSizePt, the current blockType, and a review summary.
Subscribe once and let the returned unsubscribe function run on unmount. State is published on every selection change, so buttons stay in sync with the caret without polling.

What the toolbar controller covers

undo, redo, copy, copyAs("plaintext" | "markdown" | "html"), cut, paste, pasteTextOnly, pasteFormattingOnly
toggleBold, toggleItalic, toggleUnderline, toggleStrikethrough, toggleDoubleStrikethrough, toggleSmallCaps, toggleAllCaps, toggleCode, toggleLatex, toggleSuperscript, toggleSubscript, clearFormatting, setFontFamily, setFontSize, setLetterSpacing, setTextColor, setHighlightColor
setHeading, setAlignment, setLineSpacing, toggleList, createLink, increaseIndent, decreaseIndent
insertTable, insertImage, insertContainer, insertCodeBlock, insertMathBlock, insertDiagram, insertFootnote, insertPageNumber, insertPageBreak, insertSectionBreak
openReview, closeReview, reviewPrevious, reviewNext, acceptCurrent, rejectCurrent, acceptAll, rejectAll, setShowRemovals, setSuggestionViewMode
Commands return false when they cannot apply — read-only documents, no selection, nothing to undo — so you can drive disabled states from the return value as well as from state.

Title, mode, and review

The view controller carries the chrome the title bar used to own:
A single Editing/Suggesting button is usually all a host needs:

Built-in tabs

If you would rather not build a file switcher, turn on the native one:
Without an onNewTab callback no ”+” button renders — document creation stays the host’s decision.

Focus

The editor takes keyboard focus when a document becomes active. On a page where the editor is one element among many — a preview, a marketing surface, a split view the user did not ask for — turn that off and let a click do it: