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" /><DocxEditorToolbar.Button slot-id="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.
| Column | Meaning |
|---|---|
| Packaged surface | Where the standard editor places the control. Explicit composition means you add the named part yourself. |
| Toolbar part | The 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
| Slot | Packaged surface | Toolbar part | Purpose |
|---|---|---|---|
history.undo | Default toolbar | Undo | Undo the last document change |
history.redo | Default toolbar | Redo | Redo the last undone change |
zoom.level | Default toolbar | Zoom | Change the viewport zoom |
styles.style | Default toolbar | StylePicker | Apply a paragraph style |
font.family | Default toolbar | FontFamily | Choose a font family |
font.size | Default toolbar | FontSize | Choose, 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
| Slot | Packaged surface | Toolbar part | Purpose |
|---|---|---|---|
text.bold | Default toolbar | Bold | Toggle bold |
text.italic | Default toolbar | Italic | Toggle italic |
text.underline | Default toolbar | Underline | Toggle underline |
text.strike | Default toolbar | Strike | Toggle strikethrough |
text.color | Default toolbar | FontColor | Choose and apply text color |
text.highlight | Default toolbar | Highlight | Choose and apply highlight |
text.link | Default toolbar | Link | Open the link editor |
script.super | Default toolbar | Superscript | Toggle superscript |
script.sub | Default toolbar | Subscript | Toggle 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'.
| Slot | Packaged surface | Toolbar part | Purpose |
|---|---|---|---|
alignment.left | Default toolbar | Alignment, AlignLeft | Align left |
alignment.center | Default toolbar | AlignCenter | Align center |
alignment.right | Default toolbar | AlignRight | Align right |
alignment.justify | Default toolbar | AlignJustify | Justify |
direction.ltr | Default toolbar (RTL interface) | LeftToRight | Left-to-right paragraph |
direction.rtl | Default toolbar (RTL interface) | RightToLeft | Right-to-left paragraph |
list.bullet | Default toolbar | BulletList | Toggle a bulleted list |
list.numbered | Default toolbar | NumberedList | Toggle a numbered list |
list.outdent | Default toolbar | Outdent | Decrease list indent |
list.indent | Default toolbar | Indent | Increase list indent |
list.lineSpacing | Default toolbar | LineSpacing | Set line spacing |
format.painter | Default toolbar | — | Copy and apply formatting |
format.clear | Default toolbar | ClearFormatting | Clear direct formatting |
paragraph.dialog | Format 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.
| Slot | Packaged surface | Toolbar part | Purpose |
|---|---|---|---|
review.comments | Default toolbar | Comments | Show or hide the comments and changes pane |
review.addComment | Context menu | AddComment | Start a comment draft on the selection in the review rail |
review.paragraphMarks | Review menu | — | Show paragraph-break marks |
review.bookmarks | Review menu | — | Show bracket marks at bookmarks |
review.protectDocument | Review menu | — | Toggle document protection |
review.compareDocuments | Review menu | — | Open Compare documents |
review.simpleMarkup | Review menu | — | Show the proposed result with change bars |
review.allMarkup | Review menu | — | Show all revision markup |
review.noMarkup | Review menu | — | Show the proposed result |
review.revisionMarkup | Review menu | — | Open Track changes options |
review.original | Review menu | — | Show the original document |
review.previousChange | Review menu | — | Go to the previous change |
review.nextChange | Review menu | — | Go to the next change |
review.acceptAllChanges | Review menu | — | Accept all document changes |
review.rejectAllChanges | Review menu | — | Reject all document changes |
review.authors | Review menu | Reviewers | Filter markup by reviewer |
review.editingMode | Default toolbar | EditingMode | Select editing or review mode |
contentControl.showAll | Explicit composition | ContentControlShowAll | Show content-control boundaries |
contentControl.formFill | Explicit composition | ContentControlFormFill | Toggle form-fill mode |
contentControl.inspector | Explicit composition | ContentControlInspector | Open content-control properties |
contentControl.remove | Explicit composition | ContentControlRemove | Remove 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.
| Slot | Packaged surface | Toolbar part | Purpose |
|---|---|---|---|
image.insert | Insert menu, image context | ImageInsert | Insert an image |
image.properties | Image context | ImageProperties | Open image properties |
image.wrap | Image context | ImageWrap | Choose text wrapping |
image.altText | Image context | ImageAltText | Edit alternative text |
image.editChart | Chart context | — | Open the Chart pane for the selected chart |
image.formatShape | Shape context | — | Open the Format shape pane for the selected shape |
table.insert | Insert menu | TableInsert | Insert a table of the size picked in a 6×6 grid |
table.borderTarget | Table context | TableBorderTarget | Choose which borders to affect |
table.borderColor | Table context | TableBorderColor | Choose and apply border color |
table.borderStyle | Table context | TableBorderStyle | Choose border style |
table.borderWidth | Table context | TableBorderWidth | Choose border width |
table.cellFill | Table context | TableCellFill | Choose and apply cell fill |
table.mergeCells | Table context, context menu | TableMergeCells | Merge the selected cells into one |
table.splitCell | Table context, context menu | TableSplitCell | Open 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.
| Slot | Packaged surface | Part | Purpose |
|---|---|---|---|
shape.fill | Shape context, Format shape pane | DocxEditor.ShapeFill | Choose the fill color, or No fill |
shape.fillTransparency | Format shape pane | DocxEditor.ShapeFillTransparency | Set the fill transparency in percent |
shape.outlineColor | Shape context, Format shape pane | DocxEditor.ShapeOutlineColor | Choose the outline color, or No line |
shape.outlineWidth | Shape context, Format shape pane | DocxEditor.ShapeOutlineWidth | Set the outline width in points |
shape.outlineDash | Shape context, Format shape pane | DocxEditor.ShapeOutlineDash | Choose a solid, dotted, or dashed outline |
chart.type | Chart context, Chart pane | DocxEditor.ChartType | Change the chart type |
chart.title | Chart context, Chart pane | DocxEditor.ChartTitle | Set or remove the chart title |
chart.legend | Chart context, Chart pane | DocxEditor.ChartLegend | Place or hide the legend |
chart.dataLabels | Chart context, Chart pane | DocxEditor.ChartDataLabels | Toggle data labels |
chart.axes | Chart pane | DocxEditor.ChartAxes | Toggle the axes |
chart.gridlines | Chart pane | DocxEditor.ChartGridlines | Toggle the major gridlines |
chart.categoryAxisTitle | Chart pane | DocxEditor.ChartCategoryAxisTitle | Set the category or X axis title |
chart.valueAxisTitle | Chart pane | DocxEditor.ChartValueAxisTitle | Set the value or Y axis title |
chart.seriesColor | Chart pane | DocxEditor.ChartSeriesColors | Choose a series or point color |
chart.data | Chart pane | DocxEditor.ChartData | Edit 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.
| Slot | Packaged surface | Toolbar part | Purpose |
|---|---|---|---|
file.open | File menu | — | Load a document |
file.save | File menu | Save | Save a document |
file.exportMarkdown | File > Export | — | Download continuous Markdown through menu.exporters.markdown |
file.exportPdf | File > Export | — | Download PDF through menu.exporters.pdf |
file.print | File menu | — | Print a PDF from menu.exporters.pdf |
file.pageSetup | File menu | — | Open page setup |
insert.textBox | Insert menu | — | Insert an editable text box anchored to a body paragraph |
insert.chart | Insert menu | ChartInsert | Insert a chart of the picked type |
insert.footnote | Insert menu | — | Insert a footnote |
insert.endnote | Insert menu | — | Insert an endnote |
insert.pageNumber | Header/footer options | — | Insert the current page number |
insert.totalPages | Header/footer options | — | Insert the document page count |
insert.sectionPages | Header/footer options | — | Insert the current section page count |
insert.pageXofY | Header/footer options | — | Insert a Page X of Y field pair |
insert.pageBreak | Insert menu | — | Insert a page break |
insert.sectionBreakNextPage | Insert menu | — | Start a section on the next page |
insert.sectionBreakContinuous | Insert menu | — | Start a section on the current page |
insert.toc | Insert menu | — | Insert a table of contents |
insert.bookmark | Insert menu | — | Open the Bookmark dialog |
insert.goToBookmark | Insert menu | — | Open the Bookmarks tab of the navigation pane |
insert.watermark | Insert menu | — | Open the Watermark dialog |
Check command requirements
A slot's existence does not guarantee that its command is available.
| Slot kind | How to run it |
|---|---|
| Fixed command | useEditorCommand(slotId) returns execute(), active state, enabled state, and the engine's disabled reason. |
| Value or dialog control | Pass a complete EditorCommand to useEditorCommand(), or use the packaged part or menu. |
| File action | file.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.