Chrome slot reference

Reference every editor chrome slot and its React and Vue toolbar part across default, contextual, menu, dialog, and header or footer surfaces.

Chrome slots are stable control identifiers, such as text.bold. Use named parts, such as FontColor or ImageProperties, for controls that collect a value or open UI.

Use a slot

Render a fixed-command slot that has no named part with the generic toolbar button.

<DocxEditor.Toolbar.Button slotId="format.painter" />

Toolbar.Button, Menu.Item, and ContextMenu.Slot take the ID as slotId (slot-id in Vue templates). The slot prop is deprecated and logs a development warning.

ColumnMeaning
Packaged surfaceWhere the standard editor places the control. Explicit composition means you add the named part yourself.
Toolbar partThe shared suffix. Bold means DocxEditor.Toolbar.Bold in React and DocxEditorToolbar.Bold in Vue. An em dash means no named part.

For Action, Group, Slot, and Separator, see Customize the toolbar.

Find a slot

History, zoom, styles, and font

SlotPackaged surfaceToolbar partPurpose
history.undoDefault toolbarUndoUndo the last document change
history.redoDefault toolbarRedoRedo the last undone change
zoom.levelDefault toolbarZoomChange the viewport zoom
styles.styleDefault toolbarStylePickerApply a paragraph style
font.familyDefault toolbarFontFamilyChoose a font family
font.sizeDefault toolbarFontSizeChoose, grow, or shrink the font size

The − and + buttons of FontSize dispatch decreaseFontSize and increaseFontSize. Each run steps from its own size to the next size in FONT_SIZE_PRESETS_PT, so a selection with several sizes keeps the differences between them. Below 8 pt the step is 1 pt, and above 72 pt it is 10 pt. Ctrl+Shift+> and Ctrl+Shift+< (Command+Shift on macOS) run the same commands.

Text and script

SlotPackaged surfaceToolbar partPurpose
text.boldDefault toolbarBoldToggle bold
text.italicDefault toolbarItalicToggle italic
text.underlineDefault toolbarUnderlineToggle underline
text.strikeDefault toolbarStrikeToggle strikethrough
text.colorDefault toolbarFontColorChoose and apply text color
text.highlightDefault toolbarHighlightChoose and apply highlight
text.linkDefault toolbarLinkOpen the link editor
script.superDefault toolbarSuperscriptToggle superscript
script.subDefault toolbarSubscriptToggle subscript

Alignment, direction, lists, and formatting

The default toolbar combines the four alignment slots into Alignment. Use the four Align* parts when you want separate controls.

Alignment slots name a physical edge, not a reading direction. In a right-to-left paragraph, alignment.right writes the leading edge, which OOXML spells w:jc="left". For more information, see Right-to-left support.

The direction slots set the base direction of each selected paragraph and show a mixed selection as neither pressed. The default toolbar shows them only when the interface direction is 'rtl'.

SlotPackaged surfaceToolbar partPurpose
alignment.leftDefault toolbarAlignment, AlignLeftAlign left
alignment.centerDefault toolbarAlignCenterAlign center
alignment.rightDefault toolbarAlignRightAlign right
alignment.justifyDefault toolbarAlignJustifyJustify
direction.ltrDefault toolbar (RTL interface)LeftToRightLeft-to-right paragraph
direction.rtlDefault toolbar (RTL interface)RightToLeftRight-to-left paragraph
list.bulletDefault toolbarBulletListToggle a bulleted list
list.numberedDefault toolbarNumberedListToggle a numbered list
list.outdentDefault toolbarOutdentDecrease list indent
list.indentDefault toolbarIndentIncrease list indent
list.lineSpacingDefault toolbarLineSpacingSet line spacing
format.painterDefault toolbar—Copy and apply formatting
format.clearDefault toolbarClearFormattingClear direct formatting
paragraph.dialogFormat menu—Open paragraph settings

Review and content controls

For protection settings, password limits, and command examples, see Document protection.

Comments and reviewer filtering require the Pro review module. Content-control slots require the typed content-control capability. The two surface toggles can be composed anywhere; inspector and remove become enabled when the selection supports them.

SlotPackaged surfaceToolbar partPurpose
review.commentsDefault toolbarCommentsShow or hide the comments and changes pane
review.addCommentContext menuAddCommentStart a comment draft on the selection in the review rail
review.paragraphMarksReview menu—Show paragraph-break marks
review.bookmarksReview menu—Show bracket marks at bookmarks
review.protectDocumentReview menu—Toggle document protection
review.compareDocumentsReview menu—Open Compare documents
review.simpleMarkupReview menu—Show the proposed result with change bars
review.allMarkupReview menu—Show all revision markup
review.noMarkupReview menu—Show the proposed result
review.revisionMarkupReview menu—Open Track changes options
review.originalReview menu—Show the original document
review.previousChangeReview menu—Go to the previous change
review.nextChangeReview menu—Go to the next change
review.acceptAllChangesReview menu—Accept all document changes
review.rejectAllChangesReview menu—Reject all document changes
review.authorsReview menuReviewersFilter markup by reviewer
review.editingModeDefault toolbarEditingModeSelect editing or review mode
contentControl.showAllExplicit compositionContentControlShowAllShow content-control boundaries
contentControl.formFillExplicit compositionContentControlFormFillToggle form-fill mode
contentControl.inspectorExplicit compositionContentControlInspectorOpen content-control properties
contentControl.removeExplicit compositionContentControlRemoveRemove the selected control

Images and tables

The toolbar shows image controls when you select an image. It shows table border, fill, merge, and split controls when you place the caret or a cell selection in a table. The Insert menu also provides image and table insertion.

SlotPackaged surfaceToolbar partPurpose
image.insertInsert menu, image contextImageInsertInsert an image
image.propertiesImage contextImagePropertiesOpen image properties
image.wrapImage contextImageWrapChoose text wrapping
image.altTextImage contextImageAltTextEdit alternative text
image.editChartChart context—Open the Chart pane for the selected chart
image.formatShapeShape context—Open the Format shape pane for the selected shape
table.insertInsert menuTableInsertInsert a table of the size picked in a 6×6 grid
table.borderTargetTable contextTableBorderTargetChoose which borders to affect
table.borderColorTable contextTableBorderColorChoose and apply border color
table.borderStyleTable contextTableBorderStyleChoose border style
table.borderWidthTable contextTableBorderWidthChoose border width
table.cellFillTable contextTableCellFillChoose and apply cell fill
table.mergeCellsTable context, context menuTableMergeCellsMerge the selected cells into one
table.splitCellTable context, context menuTableSplitCellOpen the Split cells dialog

Shapes and charts

The toolbar shows the compact shape group when you select a shape, and the compact chart group when you select a chart. The other slots appear in the panes, and you can place any of them yourself. For examples, see Place shape and chart controls.

SlotPackaged surfacePartPurpose
shape.fillShape context, Format shape paneDocxEditor.ShapeFillChoose the fill color, or No fill
shape.fillTransparencyFormat shape paneDocxEditor.ShapeFillTransparencySet the fill transparency in percent
shape.outlineColorShape context, Format shape paneDocxEditor.ShapeOutlineColorChoose the outline color, or No line
shape.outlineWidthShape context, Format shape paneDocxEditor.ShapeOutlineWidthSet the outline width in points
shape.outlineDashShape context, Format shape paneDocxEditor.ShapeOutlineDashChoose a solid, dotted, or dashed outline
chart.typeChart context, Chart paneDocxEditor.ChartTypeChange the chart type
chart.titleChart context, Chart paneDocxEditor.ChartTitleSet or remove the chart title
chart.legendChart context, Chart paneDocxEditor.ChartLegendPlace or hide the legend
chart.dataLabelsChart context, Chart paneDocxEditor.ChartDataLabelsToggle data labels
chart.axesChart paneDocxEditor.ChartAxesToggle the axes
chart.gridlinesChart paneDocxEditor.ChartGridlinesToggle the major gridlines
chart.categoryAxisTitleChart paneDocxEditor.ChartCategoryAxisTitleSet the category or X axis title
chart.valueAxisTitleChart paneDocxEditor.ChartValueAxisTitleSet the value or Y axis title
chart.seriesColorChart paneDocxEditor.ChartSeriesColorsChoose a series or point color
chart.dataChart paneDocxEditor.ChartDataEdit categories, series, and values

File and insert

The packaged menus provide file, break, note, and table-of-contents slots. Header/footer options provide page-field slots.

SlotPackaged surfaceToolbar partPurpose
file.openFile menu—Load a document
file.saveFile menuSaveSave a document
file.exportMarkdownFile > Export—Download continuous Markdown through menu.exporters.markdown
file.exportPdfFile > Export—Download PDF through menu.exporters.pdf
file.printFile menu—Print a PDF from menu.exporters.pdf
file.pageSetupFile menu—Open page setup
insert.textBoxInsert menu—Insert an editable text box anchored to a body paragraph
insert.chartInsert menuChartInsertInsert a chart of the picked type
insert.footnoteInsert menu—Insert a footnote
insert.endnoteInsert menu—Insert an endnote
insert.pageNumberHeader/footer options—Insert the current page number
insert.totalPagesHeader/footer options—Insert the document page count
insert.sectionPagesHeader/footer options—Insert the current section page count
insert.pageXofYHeader/footer options—Insert a Page X of Y field pair
insert.pageBreakInsert menu—Insert a page break
insert.sectionBreakNextPageInsert menu—Start a section on the next page
insert.sectionBreakContinuousInsert menu—Start a section on the current page
insert.tocInsert menu—Insert a table of contents
insert.bookmarkInsert menu—Open the Bookmark dialog
insert.goToBookmarkInsert menu—Open the Bookmarks tab of the navigation pane
insert.watermarkInsert menu—Open the Watermark dialog

Check command requirements

A slot's existence does not guarantee that its command is available.

Slot kindHow to run it
Fixed commanduseEditorCommand(slotId) returns execute(), active state, enabled state, and the engine's disabled reason.
Value or dialog controlPass a complete EditorCommand to useEditorCommand(), or use the packaged part or menu.
File actionfile.open and file.save need the loading and saving APIs. Export and print slots need menu.exporters handlers.

For complete signatures, see the core API reference, React API reference, or Vue API reference.

See also