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
SettoolbarMode="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.
What the toolbar controller covers
Clipboard and history
Clipboard and history
undo, redo, copy, copyAs("plaintext" | "markdown" | "html"), cut,
paste, pasteTextOnly, pasteFormattingOnlyInline formatting
Inline formatting
toggleBold, toggleItalic, toggleUnderline, toggleStrikethrough,
toggleDoubleStrikethrough, toggleSmallCaps, toggleAllCaps,
toggleCode, toggleLatex, toggleSuperscript, toggleSubscript,
clearFormatting, setFontFamily, setFontSize, setLetterSpacing,
setTextColor, setHighlightColorParagraph and block
Paragraph and block
setHeading, setAlignment, setLineSpacing, toggleList, createLink,
increaseIndent, decreaseIndentInsertion
Insertion
insertTable, insertImage, insertContainer, insertCodeBlock,
insertMathBlock, insertDiagram, insertFootnote, insertPageNumber,
insertPageBreak, insertSectionBreakReview
Review
openReview, closeReview, reviewPrevious, reviewNext,
acceptCurrent, rejectCurrent, acceptAll, rejectAll,
setShowRemovals, setSuggestionViewModefalse 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
Theview controller carries the chrome the title bar used to own:
Built-in tabs
If you would rather not build a file switcher, turn on the native one:onNewTab callback no ”+” button renders — document creation stays
the host’s decision.