@docx-editor.dev/react
v2.36.0 · 1 published subpath with full TypeScript signatures and JSDoc.
Package root
React adapter for the DOCX editor. A thin renderer over the Editor contract from @docx-editor.dev/core: it supplies DOM and paints the engine's positioned display list, and holds no editing-engine state.
Functions (129)
ContextMenuCellVerticalAlignmentfunctionSource ↗
Compact vertical-alignment picker for selected table cells.
declare function ContextMenuCellVerticalAlignment(input: ContextMenuCommandProps): react.JSX.Element | null;ContextMenuItemfunctionSource ↗
A host-owned context-menu row, styled and behaved like the packaged ones.
The toolbar's Action for the right-click surface: no slot, no command, no engine wiring — enabled state and the action are the host's, because the engine has no opinion about an action it does not model. Selecting it closes the menu.
declare function ContextMenuItem(input: ContextMenuItemProps): react.JSX.Element;ContextMenuPastefunctionSource ↗
Paste the clipboard's text at the selection.
THE ROW READS THE CLIPBOARD, not the engine. exec is synchronous and clipboard read is not — it prompts in Chrome and is refused outright by Firefox and Safari — so the read happens here, inside the click that asked for it, where the permission gesture belongs, and the text goes to the engine as an argument.
Nothing can know whether the read will succeed BEFORE it is attempted, so the row starts enabled (when the engine would accept a paste at all) and disables itself, with the browser's own reason, once a read has actually been refused. Guessing the answer up front would either grey out a working Paste on Chrome or advertise a dead one on Safari.
declare function ContextMenuPaste(input: ContextMenuCommandProps): react.JSX.Element | null;ContextMenuPasteWithoutFormattingfunctionSource ↗
Paste the clipboard's plain text as if typed, whatever richer flavours it holds.
The Cmd+Shift+V twin as a menu row: same clipboard-read contract as [ContextMenuPaste](ContextMenuPaste), routed through the pasteWithoutFormatting command.
declare function ContextMenuPasteWithoutFormatting(input: ContextMenuCommandProps): react.JSX.Element | null;definePopupfunctionSource ↗
Register an ordinary component in the popups map while preserving its props and hooks. Define the component outside the parent render function to keep its state on rerenders.
declare function definePopup<Props extends object>(component: ComponentType<Props>): (props: Props) => DocxEditorChildren;DocumentNamefunctionSource ↗
Deprecated. Use `<DocxEditor>` document name slot instead.
declare function DocumentName(input: DocumentNameProps): react__default.JSX.Element;DocxEditorAuthorStylefunctionSource ↗
Declare one author's presentation, while mounted.
Renders nothing. The editor already colours every author from the --doc-review-author-N ramp; this overrides one of them, and leaves the rest where they are. Prop changes re-apply live — pages repaint without a remount, so the caret and undo history stay — and unmounting returns that author to the ramp.
Read who is in the document with useReviewAuthors, and read these declarations back inside a custom review card with useReviewAuthor.
tsx
<DocxEditor.Root document={bytes} modules={MODULES}>
<DocxEditor.AuthorStyle author="Jess Lin" color="#7c3aed" avatarUrl="/jess.png" />
…
</DocxEditor.Root>
declare function DocxEditorAuthorStyle(props: DocxEditorAuthorStyleProps): null;DocxEditorColorByChangeTypefunctionSource ↗
Colour tracked changes by the TYPE of change instead of by author, while mounted.
The editor colours by author out of the box — Word's own default, so a paragraph three people edited reads as three people. Mount this to opt out: insertions take --doc-revision-insertion and deletions --doc-revision-deletion, whoever proposed them. Renders nothing; unmounting it returns to by-author colouring.
Composed with DocxEditor.AuthorStyle, it also expresses "highlight these reviewers and leave everyone else green and red": the authors you declare keep their own colour, and this puts the rest on the kind colours.
tsx
<DocxEditor.Root document={bytes} modules={MODULES}>
<DocxEditor.ColorByChangeType />
…
</DocxEditor.Root>
declare function DocxEditorColorByChangeType(): null;DocxEditorContentfunctionSource ↗
The element the engine paints pages into. Must render inside a DocxEditor.Viewport; the facade attaches here and detaches on unmount. Detaching parks the editor, so mounting the content elsewhere, even in another window, moves it with its undo history, selection and reading position.
Its centring margin lives in the STYLESHEET, not in an inline style here, and behind :where() so it carries no specificity: a host that places the page itself — inside its own stage, beside its own art — overrides it with a plain class and no !important. An inline style could not be beaten by a class at all, which is exactly the trap that makes a library feel like something to fight.
declare function DocxEditorContent(input: DocxEditorContentProps): react.JSX.Element;DocxEditorContextMenufunctionSource ↗
The packaged right-click menu over the painted document.
Mounted by default inside DocxEditor.Viewport; contextMenu={false} on DocxEditor removes it. Rendered as a child of the viewport so it finds its own surface, but positioned in client space, so it is never clipped by the scroller.
declare function DocxEditorContextMenu(input: DocxEditorContextMenuProps): react.JSX.Element;DocxEditorDocumentOutlinefunctionSource ↗
The document outline as a context-fed part (DocxEditor.DocumentOutline): headings from Editor.getOutline(), in document order; clicking one moves the caret to that heading. The panel positions absolutely — give it a position: relative container.
Renders nothing while the editor has no document — a floating panel saying "no headings" about a document that is not there is the same false claim the rulers made.
declare function DocxEditorDocumentOutline(props: DocxEditorDocumentOutlineProps): ReactElement | null;DocxEditorEquationfunctionSource ↗
Default equation editor mounted by the packaged React host.
declare function DocxEditorEquation(): react.JSX.Element | null;DocxEditorExportDialogfunctionSource ↗
Default progress and error dialog for popups.export.
declare function DocxEditorExportDialog(input: DocxEditorExportDialogProps): react.JSX.Element | null;DocxEditorFontNoticefunctionSource ↗
Word-style font compatibility notice.
Shown when the open document declares font families this platform cannot resolve — not installed, not embedded in the file, not supplied by the app's font configuration — so the text is rendering in a substitute face. Dismissing hides the notice for that set of families; a different document (or a font arriving) changes the set and surfaces it again.
declare function DocxEditorFontNotice(input: DocxEditorFontNoticeProps): react.JSX.Element | null;DocxEditorHeaderFooterChromefunctionSource ↗
Thin overlay while a header or footer scope is open: region label and contextual options. Mount beside DocxEditor.Content.
declare function DocxEditorHeaderFooterChrome(input: DocxEditorHeaderFooterChromeProps): ReactElement | null;DocxEditorHorizontalRulerfunctionSource ↗
The horizontal ruler as a context-fed part (DocxEditor.HorizontalRuler): page width, margins and zoom straight from the editor. Left/right margin handles are draggable when the engine supports page-setup writes; the drag previews locally and commits one undoable step on release.
Renders nothing while the editor holds no document — see [selectDocumentAbsent](selectDocumentAbsent).
declare function DocxEditorHorizontalRuler(props: DocxEditorRulerProps): ReactElement | null;DocxEditorImageAltTextPopupfunctionSource ↗
Default image alt-text panel.
declare function DocxEditorImageAltTextPopup(input: DocxEditorImageAltTextPopupProps): react.JSX.Element;DocxEditorImageInsertErrorDialogfunctionSource ↗
The packaged picture refusal: an editor dialog, never a page-blocking browser alert.
declare function DocxEditorImageInsertErrorDialog(input: DocxEditorImageInsertErrorDialogProps): react.JSX.Element;DocxEditorImagePropertiesDialogfunctionSource ↗
Properties dialog for the selected picture.
declare function DocxEditorImagePropertiesDialog(input: DocxEditorImagePropertiesDialogProps): react.JSX.Element | null;DocxEditorInvalidTextFormFieldDialogfunctionSource ↗
Default acknowledgement shell for a custom popup renderer.
declare function DocxEditorInvalidTextFormFieldDialog(props: DocxEditorInvalidTextFormFieldDialogProps): react.JSX.Element;DocxEditorLoadingSpinnerfunctionSource ↗
The packaged spinner, on its own. Exposed because children replaces the default screen wholesale — a host that wants "spinner plus my own label" would otherwise have to hand-copy an internal class name.
Decorative: it carries aria-hidden, so the surrounding live region needs its own text. DocxEditor.Loading supplies a translated one when you pass no children.
declare function DocxEditorLoadingSpinner(input: DocxEditorLoadingSpinnerProps): react.JSX.Element;DocxEditorNavigationfunctionSource ↗
The document navigation pane — headings and find — over the left gutter.
declare function DocxEditorNavigation(props: DocxEditorNavigationProps): ReactElement;DocxEditorNotePreviewfunctionSource ↗
Default informational note preview.
declare function DocxEditorNotePreview(input: DocxEditorNotePreviewProps): react.JSX.Element;DocxEditorNotePropertiesDialogfunctionSource ↗
Default note properties dialog.
declare function DocxEditorNotePropertiesDialog(props: DocxEditorNotePropertiesDialogProps): ReactElement;DocxEditorNotesChromefunctionSource ↗
declare function DocxEditorNotesChrome(input: DocxEditorNotesChromeProps): ReactElement | null;DocxEditorNotesContextMenufunctionSource ↗
Default note context menu.
declare function DocxEditorNotesContextMenu(input: DocxEditorNotesContextMenuProps): react.JSX.Element;DocxEditorOpenFailureActionfunctionSource ↗
A button in the open-failure dialog, styled as the packaged **Close**. Use it in actions, or in your own children. With asChild, it styles your own element instead, such as a link to your support page:
tsx
<DocxEditor.OpenFailure
actions={({ failure }) => (
<DocxEditor.OpenFailure.Action asChild>
<a href={/support?code=${failure.code}}>Get help</a>
</DocxEditor.OpenFailure.Action>
)}
/>
declare function DocxEditorOpenFailureAction(input: DocxEditorOpenFailureActionProps): react.JSX.Element;DocxEditorPageNumberfunctionSource ↗
Floating localized page readout for the active DocxEditor.Viewport.
It appears while a multi-page document scrolls and fades after 600 ms of inactivity. It is positioned absolute against the nearest positioned ancestor, so give the element that holds the viewport position: relative.
Place it as a sibling of the viewport or inside it. Inside the viewport, it renders into the viewport's parent element, so it stays in view while the pages scroll.
declare function DocxEditorPageNumber(input: DocxEditorPageNumberProps): react.JSX.Element | null;```tsx
<div style={{ position: 'relative', height: '100%' }}>
<DocxEditor.Viewport>
<DocxEditor.Content />
</DocxEditor.Viewport>
<DocxEditor.PageNumber />
</div>
```DocxEditorPrintDialogfunctionSource ↗
Default progress and error dialog for popups.print. The editor closes it when the browser print dialog opens.
declare function DocxEditorPrintDialog(input: DocxEditorPrintDialogProps): react.JSX.Element | null;DocxEditorRevisionMarkupfunctionSource ↗
Declares markup settings without rendering an element.
declare function DocxEditorRevisionMarkup(props: DocxEditorRevisionMarkupProps): null;DocxEditorRootfunctionSource ↗
Creates and owns a DocxEditorInstance and provides it to the subtree. Renders no DOM — compose it with DocxEditor.Viewport + DocxEditor.Content for the painted pages, and any hook-built chrome anywhere inside.
declare function DocxEditorRoot(props: DocxEditorRootProps): react.JSX.Element;DocxEditorShellfunctionSource ↗
Deprecated. Use `<DocxEditor>` from the composition layer instead.
Outer chrome of the editor: i18n + error provider wrappers, the scroll container with its background-click handler, horizontal and vertical rulers, the floating page indicator, document outline panel + toggle button, plus slots for the toolbar, paged-area body, overlays, dialogs, and hidden file inputs.
This shell renders NO review highlight of its own. Marking the active comment or tracked change belongs to the engine, which paints docx-comment-band--active and docx-revision-band--active for the item the caret is in, or for the one an Editor.setActiveReviewItem pin names instead. One source for which item is active, so a host sidebar and the painted document cannot disagree about it.
declare function DocxEditorShell(input: {
i18n: React.ComponentProps<typeof LocaleProvider>['i18n'];
isDark?: boolean;
onEditorError: (error: Error) => void;
containerRef: React.Ref<HTMLDivElement>;
scrollContainerRef: React.Ref<HTMLDivElement>;
editorContentRef: React.Ref<HTMLDivElement>;
className: string | undefined;
containerStyle: CSSProperties;
mainContentStyle: CSSProperties;
editorContainerStyle: CSSProperties;
showRuler: boolean;
readOnlyProp: boolean | undefined;
showOutline: boolean;
showOutlineButton: boolean;
sidebarOpen: boolean;
minLayoutWidth: number;
toolbarHeight: number;
editorScrollLeft: number;
expandedSidebarItem?: string | null;
trackedChanges?: readonly TrackedChangeSummary[];
onScrollContainerMouseDown: (e: React.MouseEvent) => void;
onEditorBgMouseDown: (e: React.MouseEvent) => void;
onEditorContextMenu: (e: React.MouseEvent) => void;
horizontalRulerProps: HorizontalRulerProps;
verticalRulerProps: VerticalRulerProps$1;
outlineProps: OutlineProps;
onToggleOutline: () => void;
scrollPageInfo: ScrollPageInfo;
toolbar: ReactNode;
pagedArea: ReactNode;
overlays: ReactNode;
dialogs: ReactNode;
fileInputs: ReactNode;
}): react.JSX.Element;DocxEditorUnsupportedElementfunctionSource ↗
Register a renderer under DocxEditor or DocxEditor.Root. The first mounted matching declaration wins. Prop updates retain its priority. Omit match for a catch-all. Returning null, false, an empty fragment or array, or whitespace keeps what the editor shows. Layout uses points and only sizes content without an existing layout box. Custom content gets the occurrence's box (element.bounds); size it to 100% of the width and height. Clicking a custom preview selects the underlying drawing for moving, resizing, or deletion. Links, buttons, and form fields retain their normal behavior. Components can remount when pagination or virtualization removes an occurrence.
declare function DocxEditorUnsupportedElement(input: DocxEditorUnsupportedElementProps): react.JSX.Element[];DocxEditorVerticalRulerfunctionSource ↗
The vertical ruler as a context-fed part (DocxEditor.VerticalRuler): page height, margins and zoom straight from the editor. Top/bottom margin handles are draggable when the engine supports page-setup writes, committing one undoable step on release.
Renders nothing while the editor holds no document — see [selectDocumentAbsent](selectDocumentAbsent) — and nothing while the page is wider than the viewport: the ruler rides the scroller at content x=0, so a horizontal scroll would carry it out of view, and pinning it instead would paint ticks over page text. Word's web peers drop it on cramped viewports; so does this part, and it returns as soon as the page fits again.
declare function DocxEditorVerticalRuler(props: DocxEditorRulerProps): ReactElement | null;DocxEditorViewportfunctionSource ↗
The sole scroll container for the painted document. Put DocxEditor.Content inside it; the engine discovers this element by class and manages scrolling against it.
declare function DocxEditorViewport(input: DocxEditorViewportProps): react.JSX.Element;DocxEditorWindowfunctionSource ↗
Render the editor panel in its own browser window while open is true.
Place it inside DocxEditor.Root around the parts to pop out. The Root stays in this window, so the editor moves into the pop-out and back with its undo history, selection and collaboration session. The window gets this page's stylesheets, and closing it brings the panel back and calls onClose.
declare function DocxEditorWindow(input: DocxEditorWindowProps): react.JSX.Element;```tsx
const [popped, setPopped] = useState(false);
<DocxEditor.Root document={bytes}>
<button onClick={() => setPopped(!popped)}>Pop out</button>
<DocxEditor.Window open={popped} onClose={() => setPopped(false)}>
<DocxEditor.Toolbar />
<DocxEditor.Viewport>
<DocxEditor.Content />
</DocxEditor.Viewport>
</DocxEditor.Window>
</DocxEditor.Root>
```HorizontalRulerfunctionSource ↗
declare function HorizontalRuler(input: HorizontalRulerProps$1): react__default.ReactElement;ImageAltTextfunctionSource ↗
Opens a small panel to edit image description (and optional title).
declare function ImageAltText(input: ImageAltTextProps): react.JSX.Element | null;ImageInsertProviderfunctionSource ↗
declare function ImageInsertProvider(input: ImageInsertProviderProps): react.JSX.Element;ImageInsertTriggerfunctionSource ↗
Toolbar insert-image control — opens the shared file picker.
declare function ImageInsertTrigger(input: ImageInsertTriggerProps): react.JSX.Element | null;ImagePropertiesTriggerfunctionSource ↗
Opens the image properties dialog for the selected drawing.
declare function ImagePropertiesTrigger(input: ImagePropertiesTriggerProps): react.JSX.Element | null;ImageWrapfunctionSource ↗
Wrap-text dropdown presenting all nine Word choices.
declare function ImageWrap(input: ImageWrapProps): react.JSX.Element | null;isFieldLinkfunctionSource ↗
A field-derived link (a HYPERLINK field's instruction) rather than a typed w:hyperlink. Structurally signalled: the field registry mints every record with no addressable range (paragraphId stays empty), because no w:hyperlink node backs it. The typed editing lane (edit / unlink) can never resolve its id, so chrome offers neither action. Caret dismissal DOES apply: the field is a one-unit atom, and fieldLinkAtCaret resolves the caret onto it (boundary-inclusive) so the panel closes when the caret leaves.
declare function isFieldLink(link: SurfaceHyperlink): boolean;LocaleProviderfunctionSource ↗
declare function LocaleProvider(input: LocaleProviderProps): react.JSX.Element;LogofunctionSource ↗
Deprecated. Use `<DocxEditor>` title slots instead.
declare function Logo(input: LogoProps): react__default.JSX.Element;MenuBarfunctionSource ↗
Deprecated. Use `DocxEditor.Menu` from the composition layer instead.
declare function MenuBar(): react__default.JSX.Element;NavigationClosefunctionSource ↗
The back arrow that closes the pane.
declare function NavigationClose(input: NavigationPartProps): ReactElement;NavigationFindfunctionSource ↗
The find panel: a query box, a result counter with previous/next, the match-case and whole-word toggles, and the result list. Selecting a result moves the caret onto the match and reveals its page.
declare function NavigationFind(input: NavigationPartProps): ReactElement;NavigationGoTofunctionSource ↗
The Bookmarks panel: a bookmark search box, the sort order and hidden-bookmarks toggle, and the bookmarks it offers, grouped by place when sorted by location.
declare function NavigationGoTo(input: NavigationPartProps): ReactElement;NavigationHeaderfunctionSource ↗
The pane's title row. With no children it renders the close arrow and the title.
declare function NavigationHeader(input: NavigationPartProps): ReactElement;NavigationHeadingsfunctionSource ↗
The heading list, indented by outline depth. Clicking a row moves the caret to that heading and brings it into view.
The filter box narrows the list CLIENT-SIDE — it hides rows whose text does not contain what you typed. It is deliberately not the document search: filtering an outline and searching a document are different questions, and the Find tab answers the second one.
declare function NavigationHeadings(input: NavigationPartProps): ReactElement;navigationPaneOverlaysfunctionSource ↗
Whether an open pane overlays the page rather than moving it: true when the viewport leaves less than [NAVIGATION_PANE_MIN_PAGE_ROOM](NAVIGATION_PANE_MIN_PAGE_ROOM) beside the reservation. Uses the viewport's client width only, never a padding the pane itself causes, so the answer cannot feed back into its own input. false for a viewport that has not been measured.
declare function navigationPaneOverlays(viewportWidth: number, reservation: number): boolean;navigationPaneReservationfunctionSource ↗
Total left space an open pane needs before the page may start.
declare function navigationPaneReservation(paneWidth?: number): number;navigationShiftfunctionSource ↗
The viewport's left padding, in px, that puts the page's left edge exactly at reservation — and 0 whenever the gutter is already wide enough.
Returns 0 for a degenerate measurement (a viewport that has not been laid out yet, a document with no page setup) rather than guessing: shifting on a zero measurement would make the pane jump on the first frame and settle on the second.
declare function navigationShift(input: NavigationShiftInput): number;NavigationTabfunctionSource ↗
One tab button. Children replace the label.
declare function NavigationTab(input: NavigationTabProps): ReactElement;NavigationTabsfunctionSource ↗
The tab strip. With no children it renders one Tab per tab the pane supports.
A real role="tablist", so arrow keys move between tabs and a screen reader announces the panel each one controls.
declare function NavigationTabs(input: NavigationPartProps): ReactElement;NavigationTitlefunctionSource ↗
The pane's heading text.
declare function NavigationTitle(input: NavigationPartProps): ReactElement;NavigationTogglefunctionSource ↗
The collapsed pane's disc button. DocxEditor.Navigation renders one for you while the pane is closed; place it yourself (a toolbar, a menu) with toggle={false} on the root.
declare function NavigationToggle(input: NavigationPartProps): ReactElement;normalizeImageBytesfunctionSource ↗
Preflight raster bytes for insert/replace. Never allocates from file-supplied dimensions alone.
declare function normalizeImageBytes(bytes: Uint8Array): NormalizedImagePayload;PageIndicatorfunctionSource ↗
Floating page indicator shown next to the scrollbar while the user scrolls a multi-page document. Wrapped so the {current} of {total} template runs through t(); useTranslation() only works inside <LocaleProvider>, which DocxEditor's own body is not.
declare function PageIndicator(input: PageIndicatorProps): react.JSX.Element;PaginatedDocxEditorfunctionSource ↗
declare function PaginatedDocxEditor(input: PaginatedDocxEditorProps): react.JSX.Element;PaginatedDocxEditorShellfunctionSource ↗
Deprecated. Use `<DocxEditor>` from the composition layer instead.
declare function PaginatedDocxEditorShell(input: PaginatedDocxEditorShellProps): react.JSX.Element;provideDocxEditorfunctionSource ↗
Prepares Root props and listeners while exposing the instance created by that Root. Call this function during render, like a React hook.
declare function useProvidedDocxEditor(options: DocxEditorRootProps): ProvideDocxEditorResult;reviewGutterfunctionSource ↗
The paddings, in px, the scroll container reserves for the review rail.
Returns the FULL column for a degenerate measurement (a viewport that has not been laid out yet, a document with no page setup) rather than guessing: that is the value the stylesheet fell back to before this measurement existed, so an unmeasured first frame paints exactly as it always did and collapses only once there is a real width to decide by.
declare function reviewGutter(input: ReviewGutterInput): ReviewGutter;SlotfunctionSource ↗
Renders its single child element with the slot's props merged in.
declare function Slot(input: SlotProps): ReactElement<unknown, string | react.JSXElementConstructor<any>> | null;TitleBarfunctionSource ↗
Deprecated. Use `<DocxEditor>` from the composition layer instead.
declare function TitleBar(input: TitleBarProps): react__default.JSX.Element;TitleBarRightfunctionSource ↗
Deprecated. Use `<DocxEditor>` title slots instead.
declare function TitleBarRight(input: TitleBarRightProps): react__default.JSX.Element;ToolbarfunctionSource ↗
Deprecated. Use `DocxEditor.Toolbar` from the composition layer instead.
declare function Toolbar(explicitProps: ToolbarProps): react__default.JSX.Element;ToolbarButtonfunctionSource ↗
Deprecated. Use `DocxEditor.Toolbar` button parts instead.
declare function ToolbarButton(input: ToolbarButtonProps): react__default.JSX.Element;ToolbarGroupfunctionSource ↗
Deprecated. Use `DocxEditor.Toolbar` group parts instead.
declare function ToolbarGroup(input: ToolbarGroupProps): react__default.JSX.Element;useBookmarkDialogfunctionSource ↗
Read the enclosing Bookmark dialog draft.
declare function useBookmarkDialog(): UseBookmarkDialogReturn;useBookmarksfunctionSource ↗
The document's bookmarks plus the commands that change them.
declare function useBookmarks(): UseBookmarksReturn;useChromeDirfunctionSource ↗
The dir attribute a chrome part sets on its root: the direction a provider decided (its dir prop, the catalog's _dir, or a right-to-left _lang), otherwise nothing, so the part keeps the host page direction.
Read it in your own controls to follow the editor chrome: undefined means the chrome inherits the host page direction, so set no dir then.
declare function useChromeDir(): 'ltr' | 'rtl' | undefined;useChromeTranslatefunctionSource ↗
The catalogue-backed resolver for composed chrome, ready to pass as any part's t.
useTranslation().t is keyed by the strict TranslationKey union, which does not assign to the parts' plain-string t props — so before this hook, every composing host hand-wrote the same cast wrapper <DocxEditor> builds internally. This is that wrapper, exported: it resolves through the active LocaleContext catalogue (bundled English by default), with overrides consulted first for key-level renames.
```tsx const MY_LABELS = new Map([['formattingBar.bold', 'Heavy']]); // module-level: stable identity
const t = useChromeTranslate(MY_LABELS); <DocxEditor.Toolbar t={t} /> ```
Keep the overrides Map identity stable (module-level or memoized) — the returned resolver is memoized on it, and an inline new Map(...) re-creates the resolver, and with it every consuming part's props, on each render.
overrides is a Map on purpose: the key is caller input, and an object literal would answer constructor and toString off the prototype chain. Parts pass no params today for overridden keys, so override values are literal strings.
declare function useChromeTranslate(overrides?: ReadonlyMap<string, string>): ChromeTranslate;useCommentDraftRequestfunctionSource ↗
Open the host's own comment draft when the review.addComment control is pressed.
While the component is mounted and handler is set, the control is enabled (subject to the engine's other rules: the review module, the editing mode, and a selection). Without any registration the control is disabled, because nothing could open the draft. The most recent registration receives each request. Pass null to stop serving requests, for example while your comment UI cannot open a draft.
The handler takes no arguments. Read the selection with editor.getSelectionPlacement(), and pin it with editor.retainSelection() while the draft is open.
declare function useCommentDraftRequest(handler: (() => void) | null | undefined): void;```tsx
function CommentButton() {
const [drafting, setDrafting] = useState(false);
useCommentDraftRequest(() => setDrafting(true));
const addComment = useEditorCommand('review.addComment');
return (
<>
<button
disabled={!addComment.isEnabled}
title={addComment.disabledReason ?? 'Add comment'}
onClick={() => addComment.execute()}
>
Add comment
</button>
{drafting ? <MyCommentDraft onClose={() => setDrafting(false)} /> : null}
</>
);
}
```useCompareDocumentsDialogfunctionSource ↗
Read the enclosing Compare documents draft.
declare function useCompareDocumentsDialog(): UseCompareDocumentsDialogReturn;useContentControlfunctionSource ↗
Headless content-control chrome. Mount under DocxEditor.Root.
Both the context-provided instance and a local fallback run every render (same order), matching useHyperlinkPopup.
declare function useContentControl(): UseContentControlResult;useContentControlInstancefunctionSource ↗
Create the content-control chrome state. Used by DocxEditor.Root to publish one shared instance; also usable in tests without the provider.
declare function useContentControlInstance(): UseContentControlResult;useContentControlWidgetfunctionSource ↗
Draft state of the enclosing content-control value pop-up.
declare function useContentControlWidget(): UseContentControlWidgetResult;useContextMenuTargetfunctionSource ↗
The element the opening right-click landed on, or null while the menu is closed.
Public so capability packages can render contextual sections — a row that only exists when the press landed on their own painted chrome — without a second listener.
declare function useContextMenuTarget(): HTMLElement | null;useDocumentOutlinefunctionSource ↗
The document outline's behavior, with no UI attached: the headings, their nesting depth, and the jump. DocxEditor.Navigation.Headings is this hook plus rows; a host that wants a different list takes the hook and renders its own.
declare function useDocumentOutline(): UseDocumentOutlineResult;useDocumentSearchfunctionSource ↗
The editor's shared search, with no UI attached. The packaged Find pane uses the same session, so state set here shows there.
declare function useDocumentSearch(options?: UseDocumentSearchOptions): UseDocumentSearchResult;useDocxEditorfunctionSource ↗
The editor instance from the nearest DocxEditor.Root, or null before the Root's mount effect has created it (and outside any Root). Deliberately not a throwing variant: pre-mount is a normal frame every consumer renders through, and the state hooks built on this already answer it with a typed loading snapshot.
declare function useDocxEditor(): DocxEditorInstance | null;useDocxSourcefunctionSource ↗
Load a document (and optionally fonts) for DocxEditor.
tsx
const { document, fonts, error } = useDocxSource(url, { fonts: packagedFonts() });
if (error) return <p>{error.message}</p>;
return <DocxEditor document={document} fonts={fonts} />;
FONTS NEVER FAIL THE DOCUMENT. A face that will not load degrades that family to fixed-width measurement — the document still opens, it just paginates less like Word — so a font failure leaves error null and is the loader's to report. A document failure is different: there is nothing to show, so it lands on error.
THE DOCUMENT WAITS FOR THE FONTS, on the eager path. They fetch concurrently, but document stays undefined until fonts have settled — resolved OR failed — because layout MEASURES with them. Handing the editor bytes first paginates the whole document on the fixed fallback and then re-paginates when the real faces arrive, which the reader sees as the text jumping. One slightly longer wait beats a visible reflow. Without a fonts option there is nothing to wait for and the bytes go straight through.
AN ON-DEMAND ORIGIN CANNOT BE WAITED FOR, and this hook does not pretend otherwise. A resolver is answered with the families the file declares, which nothing knows until the engine has parsed it, so holding the bytes back would wait on work that only the bytes can start. document is released at once, fonts is a stable resolver, and the engine re-paginates when the faces land. That one reflow is what buys loading the faces a document uses rather than everything an origin would load up front; { fonts: defaultFonts } is still there when the no-reflow guarantee matters more than the megabytes.
A URL is fetched with the browser's own fetch, exactly as the caller wrote it. Validate it first if it came from user input: this hook adds no allowlist of its own, and inventing one would only give callers a false sense of where the trust boundary is.
declare function useDocxSource(source: DocxSource | null | undefined, options?: UseDocxSourceOptions): UseDocxSourceResult;useEditorCaretfunctionSource ↗
The caret's paragraph and offset, or null when nothing is placed.
Compared by value, so a consumer re-renders only when the caret actually moves.
tsx
const caret = useEditorCaret();
// …later, in a menu row that inserts at where the user was reading:
insertCustomNode(editor, citation, attrs, label, caret ? { at: caret } : {});
declare function useEditorCaret(): EditorCaret | null;useEditorColorModefunctionSource ↗
The theme the enclosing DocxEditor.Root resolved from its colorMode, so parts you build yourself can match the editor chrome. 'system' resolves to the operating system's current setting and re-renders when it changes. Outside a Root, or without colorMode, the answer is 'light'.
declare function useEditorColorMode(): UseEditorColorModeReturn;```tsx
function MyPanel() {
const { colorMode } = useEditorColorMode();
return <aside className={colorMode === 'dark' ? 'panel panel--dark' : 'panel'} />;
}
```useEditorCommandfunctionSource ↗
Bind a chrome slot ('text.bold', 'history.undo', …) or a raw EditorCommand ({ type: 'selectAll' }) to the editor. The result object is identity-stable while its fields are unchanged, so it can sit in dependency arrays and memo props without churn.
declare function useEditorCommand(target: ChromeSlotId | EditorCommand): EditorCommandState;useEditorEventfunctionSource ↗
Subscribe to an editor event ('change', 'selectionChange', 'error', …) for the lifetime of the component. No-op until the nearest DocxEditor.Root has created the editor; resubscribes automatically when the instance is replaced.
declare function useEditorEvent<E extends keyof EditorEvents>(event: E, handler: EditorEvents[E]): void;useEditorHostDocumentfunctionSource ↗
The document the editor's pages are mounted in: a pop-out window's or an iframe's when the host attached the editor there, otherwise the page's own. null during server rendering.
Custom chrome that adds document listeners, reads focus, or injects a <style> uses this instead of the global document, which belongs to the window the script runs in. The value changes when the editor moves to another window, so effects keyed on it re-bind. Its defaultView is the editor's window, for timers, viewport size and the clipboard.
declare function useEditorHostDocument(): UseEditorHostDocumentReturn;```tsx
function ShortcutListener() {
const hostDocument = useEditorHostDocument();
useEffect(() => {
if (!hostDocument) return;
hostDocument.addEventListener('keydown', onShortcut);
return () => hostDocument.removeEventListener('keydown', onShortcut);
}, [hostDocument]);
return null;
}
```useEditorSnapshotfunctionSource ↗
Re-render the caller whenever the editor commits a change, moves the selection, or republishes display. Returns a counter that changes on each such event, so it can also be used as a dependency.
declare function useEditorSnapshot(editor: Editor | null): number;useEditorStatefunctionSource ↗
Subscribe to a slice of the editor's read model. Re-renders the component ONLY when selector's result changes (by isEqual, default Object.is).
Before the editor exists — outside a DocxEditor.Root, pre-mount, and on the server — the selector receives a frozen loading snapshot (isLoading: true, page: {current: 0, total: 0}), never null.
declare function useEditorState<T>(selector: (snapshot: EditorSnapshot) => T, isEqual?: (a: T, b: T) => boolean, options?: UseEditorStateOptions): T;useEditorValueCommandfunctionSource ↗
Bind a value slot. Font size values use half-points; colors use six digits without #.
declare function useEditorValueCommand<K extends keyof ToolbarValueMap>(slotId: K): EditorValueCommandState<ToolbarValueMap[K]>;useFontFamilyfunctionSource ↗
The font-family picker's behavior, UI-free.
declare function useFontFamily(): UseFontFamilyResult;useFontsfunctionSource ↗
Merge font origins into one stable value for DocxEditor.Root's fonts prop.
```tsx // The bundled substitutes: the families this document names, plus its default face. const fonts = useFonts(packagedFonts());
// The same, plus the Google catalog for everything they do not cover. const fonts = useFonts(packagedFonts(), googleFonts());
// Brand faces first, then whatever is left. const fonts = useFonts(brandFragment, packagedFonts());
return <DocxEditor.Root fonts={fonts}>{children}</DocxEditor.Root>; ```
EVERY argument takes the same union, so adding an origin is adding an argument and never a change of shape. Origins compose first-wins in argument order, exactly like composeFontConfiguration: the first argument beats later ones, and any of them beats a substitution for a family some origin supplies directly.
They resolve ONE AFTER ANOTHER, not concurrently, so that each can be told which faces the ones before it already cover and skip fetching them. That costs one extra origin's latency on the critical path and saves a duplicate download — and, for a network origin, a request that would have told a font host which families the document uses for nothing. Order origins cheapest-first.
The returned resolver never changes identity, so the editor is never rebuilt on account of this prop. Arguments are re-read when opening a document or requesting a new family. Changing them alone does not replace already loaded faces; reload the document for that.
It is marked (defineFontResolver), so it can itself be an origin of another list or useDocxSource's fonts option without being mistaken for a zero-argument loader.
declare function useFonts(source: FontsInput, ...fragments: readonly (FontConfigurationFragment | undefined)[]): MarkedFontResolver;useFontsfunctionSource ↗
The uniform form: every position takes the same [FontOrigin](FontOrigin), so composing two resolvers is one extra argument.
A resolver in any position but the first must carry the defineFontResolver mark. The first position keeps the older, looser type so that every call that compiled before this overload existed still compiles.
declare function useFonts(...origins: readonly FontOrigin[]): MarkedFontResolver;useGoToBookmarkfunctionSource ↗
Go To for bookmarks: filter by name, move through the offered rows, and jump.
declare function useGoToBookmark(options?: UseGoToBookmarkOptions): UseGoToBookmarkReturn;useHeaderFooterStatefunctionSource ↗
Subscribe to getHeaderFooterState() with reference-stable results when unchanged.
declare function useHeaderFooterState(): HeaderFooterState | null;useHighlightAtfunctionSource ↗
The topmost text highlight under the pointer, or null. Pass a set name to watch one set. R is your range type, so fields you added to your ranges come back typed on range.
declare function useHighlightAt<R extends HighlightRange = HighlightRange>(name?: string): HighlightHit<R> | null;```tsx
const hit = useHighlightAt<GlossaryRange>('glossary');
return hit ? <Tooltip anchor={hit.rect}>{hit.range.definition}</Tooltip> : null;
```useHighlightsfunctionSource ↗
Highlight text ranges as the named set while the component is mounted, and keep them current as the document changes. Returns what the last application resolved.
Use a unique name per hook: two hooks with the same name replace each other's ranges. Keep a function source stable with useCallback.
declare function useHighlights(name: string, source: HighlightSource, options?: HighlightOptions): HighlightResult;```tsx
const findTerms = useCallback(
(editor: Editor) => editor.findMatches(terms, { wholeWord: true }).flat(),
[terms]
);
useHighlights('glossary', findTerms, { className: 'glossary-term' });
```useHistoryGroupfunctionSource ↗
Bind a control's native gesture lifecycle. Apply values through the existing command hooks.
declare function useHistoryGroup(input: HistoryGroupBindingOptions): UseHistoryGroupReturn;useHyperlinkPopupfunctionSource ↗
The hyperlink popover's behavior.
Inside DocxEditor.Root this is the SHARED state that DocxEditor.HyperLink renders, so a custom panel and the toolbar agree. Calling it marks the component as a view of that state: while one is mounted, link clicks, Ctrl/Cmd+K and the Insert link controls open it. Outside a root it is a standalone instance that registers with the engine itself — a host building its own link UI from scratch needs nothing else.
declare function useHyperlinkPopup(): UseHyperlinkPopupResult;useHyperlinkPopupInstancefunctionSource ↗
A popover instance. active gates ENGINE REGISTRATION only — an instance created inside a provider still exists, it just does not compete for the surface's chrome handlers.
declare function useHyperlinkPopupInstance(active?: boolean): UseHyperlinkPopupResult;useNavigationPanefunctionSource ↗
The navigation pane's behavior, with no UI attached: open state, the active tab, and the document displacement an open pane is entitled to.
DocxEditor.Navigation calls this and shares the result with its parts. Call it directly to drive a pane of your own.
declare function useNavigationPane(options?: UseNavigationPaneOptions): UseNavigationPaneResult;useNavigationShiftfunctionSource ↗
The px the chrome is currently displaced by an open navigation pane. 0 when no pane is mounted, when it is closed, and whenever the left gutter was already wide enough.
declare function useNavigationShift(): number;useNotePropertiesStatefunctionSource ↗
Subscribe to getNotePropertiesState() with reference-stable results when unchanged.
declare function useNotePropertiesState(): NotePropertiesState | null;useNoteScopeStatefunctionSource ↗
Subscribe to the active note view scope with reference-stable results when unchanged.
declare function useNoteScopeState(): Extract<ViewScope, {
kind: 'note';
}> | null;useOpenFailurefunctionSource ↗
Reads the document the editor refused to open, for a host that shows it in its own UI, such as a toast. Pair it with openFailure={false} on <DocxEditor>, so the packaged dialog does not show as well. Call it inside a DocxEditor.Root.
tsx
function OpenFailureToast() {
const { failure, message, dismiss } = useOpenFailure();
if (!failure) return null;
return <Toast title={message} detail={failure.code} onClose={() => dismiss(failure)} />;
}
declare function useOpenFailure(options?: UseOpenFailureOptions): UseOpenFailureReturn;usePageSetupfunctionSource ↗
The section's page setup — size, orientation, margins — plus the command to change it.
Reads snapshot().pageSetup, which is reference-stable across ticks that did not move the section, so a subscriber re-renders only when the page actually changes shape. In a multi-section document it reflects the CARET's section, as Word's ruler does.
declare function usePageSetup(): UsePageSetupReturn;usePageSetupDialogfunctionSource ↗
Read the enclosing Page Setup dialog draft.
Call it in a child of the dialog. It does not open the dialog. To open the dialog from your own toolbar, keep its open state and render DocxEditor.PageSetupDialog with open and onClose. Take the button's enabled state from usePageSetup().isEnabled.
declare function usePageSetupDialog(): UsePageSetupDialogReturn;useParagraphDialogfunctionSource ↗
Read the enclosing Paragraph Options draft.
Call it in a child of the dialog. It does not open the dialog. To open the dialog from your own toolbar, keep its open state and render DocxEditor.ParagraphDialog with open and onClose. Take the button's enabled state from useParagraphFormat().isEnabled.
declare function useParagraphDialog(): UseParagraphDialogReturn;useParagraphFormatfunctionSource ↗
The selection's paragraph formatting, plus the command to change it.
apply sends ONE setParagraphFormat, so a dialog's worth of changes is one undo step and the page repaints once.
declare function useParagraphFormat(): UseParagraphFormatReturn;useParagraphIndentfunctionSource ↗
The selection's paragraph indent — left, right, and the signed first line — plus the command to change it.
This is what DocxEditor.HorizontalRuler drives its four handles from. A host that wants its own indent chrome takes the hook and renders whatever it likes; the ruler's drag geometry is separately available as pure functions (dragIndent / handlePosition from the engine).
declare function useParagraphIndent(): UseParagraphIndentReturn;useParagraphStylefunctionSource ↗
The paragraph-style picker's behavior, UI-free.
declare function useParagraphStyle(): UseParagraphStyleResult;useReviewAuthorsfunctionSource ↗
Every author the review surface DRAWS, in Word's slot order, with the colour and style each resolves to. [] before an editor or document exists.
Both halves of review: authors of tracked changes first, numbered by where their first change appears, then authors who only commented. One person is one colour across the two. Once assigned, a slot stays with that author for the attached document session.
The complete attached-document roster. An author remains here while the current review view hides their revisions and comments, so reviewer chrome can turn them on again.
The array is reference-stable between changes (the facade caches per layout and colour state), so it is safe as a dependency and under useSyncExternalStore.
Pairs with the declarative components: read the roster here, declare the styling as <DocxEditor.AuthorStyle> elements.
tsx
const authors = useReviewAuthors();
authors.map(({ author }) => (
<DocxEditor.AuthorStyle key={author} author={author} color={myTeam[author]?.color} />
));
declare function useReviewAuthors(): readonly ReviewAuthorInfo[];useReviewGutterfunctionSource ↗
The gutter the review rail reserves right now: nothing with no rail mounted, and the measured reviewGutter pair otherwise. The one source for the scroll container's paddings and both rulers.
The result is reference-stable — the pure function answers with one of four shared constants — and the hook stores THAT, never the raw width: a resize sweeps through hundreds of widths that all resolve to the same constant, and holding the width as state re-rendered every consumer (the review rail among them) once per pixel. Storing the derived constant lets the state setter bail on identity, so consumers re-render only when the reservation actually flips.
declare function useReviewGutter(): ReviewGutter;useRevisionMarkupDialogfunctionSource ↗
Read the enclosing revision markup draft.
declare function useRevisionMarkupDialog(): UseRevisionMarkupDialogReturn;useScopeClassNamefunctionSource ↗
The scope class a chrome part should add to its own root element: the class when nothing above it is scoped, an empty string when something already is.
tsx
const scope = useScopeClassName();
<div className={${scope}docx-toolbar} />
Under a Root whose colorMode resolved dark, the class is 'docx-editor dark ', so a part you build with the editor's --doc-* tokens follows the editor theme.
Returns a trailing space so it concatenates cleanly, and '' collapses away.
declare function useScopeClassName(): '' | 'docx-editor ' | 'docx-editor dark ';useScopedChromeAnchorfunctionSource ↗
Attach contextual chrome to a painted story instead of the top of the editor viewport.
The engine owns and may replace everything inside the paginated surface, so React cannot portal controls into a header, footer, or note node. This hook keeps the controls as a sibling overlay and derives only their screen placement from the current painted host.
declare function useScopedChromeAnchor(findAnchor: (viewport: HTMLElement) => HTMLElement | null, placement: ScopedChromeAnchorPlacement): ScopedChromeAnchor;useSplitCellDialogfunctionSource ↗
Read the enclosing Split cells dialog draft.
declare function useSplitCellDialog(): UseSplitCellDialogReturn;useTableBorderTargetLabelfunctionSource ↗
Resolved label for the active border target in the shared draft.
For custom table chrome that shows the current target name outside the packaged picker.
declare function useTableBorderTargetLabel(): string;useTextFormFieldDialogfunctionSource ↗
Read the enclosing Field Options draft.
declare function useTextFormFieldDialog(): UseTextFormFieldDialogReturn;useToolbarContextfunctionSource ↗
The toolbar root's published value. Internal: parts read it, hosts pass props.
declare function useToolbarContext(): ToolbarContextValue;useToolbarLabelfunctionSource ↗
The label for an i18n key: the host's translation, else the locale catalogue.
declare function useToolbarLabel(): (key: string) => string;useToolbarLabelForfunctionSource ↗
The label for an i18n key given a host resolver: the host's translation, else the locale catalogue. The toolbar ROOT needs this before it publishes its context, so the resolver is separate from the context read below — a raw key must never reach the DOM.
declare function useToolbarLabelFor(t: ToolbarTranslate | undefined): (key: string) => string;useTranslationfunctionSource ↗
The active catalogue's t(), the catalogue itself, its language tag (_lang, en by default), which formats numbers the way the strings around them read, and the providers' writing direction (dir). dir is 'ltr' when the chrome inherits a right-to-left host page; useChromeDir() returns the direction a provider decided, or undefined then.
declare function useTranslation(): {
t: TFunction;
catalogue: LocaleStrings;
lang: string;
dir: 'ltr' | 'rtl';
};useWatermarkfunctionSource ↗
The document watermark plus the command to change it.
declare function useWatermark(): UseWatermarkReturn;useWatermarkDialogfunctionSource ↗
Read the enclosing Watermark dialog draft.
declare function useWatermarkDialog(): UseWatermarkDialogReturn;useZoomfunctionSource ↗
Read and drive the document's zoom.
tsx
const { zoom, isFit, auto, zoomIn } = useZoom();
<button onClick={auto} aria-pressed={isFit}>Fit</button>
<span>{Math.round(zoom * 100)}%</span>
Outside a DocxEditor.Root — and before the editor is created — this reports 100% fixed and every action is a no-op, so a control can render unconditionally.
declare function useZoom(): UseZoomResult;VerticalRulerfunctionSource ↗
declare function VerticalRuler(input: VerticalRulerProps): react__default.ReactElement;Interfaces (180)
BookmarkDialogFieldsinterfaceSource ↗
The Bookmark dialog's draft.
interface BookmarkDialogFields| Member | Type | Summary |
|---|---|---|
| name | string | The name typed or picked from the list. |
| sortBy | BookmarkSortOrder |
CompareDocumentsDialogValuesinterfaceSource ↗
The Compare documents draft.
interface CompareDocumentsDialogValues| Member | Type | Summary |
|---|---|---|
| authorName | string | |
| detectFormatChanges | boolean | |
| removeDateAndTime | boolean | Write the revisions without dates. Default `false`. The preset has no control for it; a custom part sets it with `setValue('removeDateAndTime', true)`. |
| revised | File | null | The revised document. The open document is the original. |
ContentControlActionPropsinterfaceSource ↗
Props for action parts that also take an icon.
interface ContentControlActionProps extends ContentControlPartProps| Member | Type | Summary |
|---|---|---|
| icon? | DocxEditorChildren |
ContentControlInspectorStateinterfaceSource ↗
Live inspector model for the control at the caret.
locked is the content-edit axis. Removal lock is reported separately via removalLocked from the boundary's effective lock / surface disabled reason.
interface ContentControlInspectorState| Member | Type | Summary |
|---|---|---|
| alias | string | null | |
| bound | boolean | |
| controlType | ContentControlType | |
| effectiveLock | ContentControlLock | null | |
| id | string | |
| locked | boolean | Content-edit locked (`contentLocked` / `sdtContentLocked` union). |
| placeholder | boolean | |
| removalLocked | boolean | Wrapper removal refused (`sdtLocked` / `sdtContentLocked` union). |
| tag | string | null |
ContentControlPartPropsinterfaceSource ↗
Shared props for every part.
interface ContentControlPartProps| Member | Type | Summary |
|---|---|---|
| asChild? | boolean | |
| children? | DocxEditorChildren | |
| className? | string |
ContentControlPropsinterfaceSource ↗
Props for DocxEditor.ContentControl.
interface ContentControlProps extends ContentControlPartProps| Member | Type | Summary |
|---|---|---|
| preset? | boolean | Render the packaged arrangement. `false` mounts only the shell and whatever parts you pass as children. |
ContentControlWidgetDayPropsinterfaceSource ↗
Props for one calendar cell.
interface ContentControlWidgetDayProps extends DocxEditorContentControlWidgetPartProps| Member | Type | Summary |
|---|---|---|
| day | CalendarDay |
ContentControlWidgetEntryinterfaceSource ↗
One selectable entry of a dropdown or combo-box control.
interface ContentControlWidgetEntry| Member | Type | Summary |
|---|---|---|
| displayText | string | |
| value | string |
ContentControlWidgetItemPropsinterfaceSource ↗
Props for one list entry.
interface ContentControlWidgetItemProps extends DocxEditorContentControlWidgetPartProps| Member | Type | Summary |
|---|---|---|
| item | ContentControlWidgetEntry |
ContentControlWidgetPicturePropsinterfaceSource ↗
Props for the picture file input.
interface ContentControlWidgetPictureProps extends DocxEditorContentControlWidgetPartProps| Member | Type | Summary |
|---|---|---|
| autoOpen? | boolean | Open the browser's file dialog as soon as the part mounts. Defaults to true. |
ContextMenuAnchorinterfaceSource ↗
Where the panel opened, in client coordinates.
interface ContextMenuAnchor| Member | Type | Summary |
|---|---|---|
| x | number | |
| y | number |
ContextMenuCommandPropsinterfaceSource ↗
Props for a packaged context-menu row.
interface ContextMenuCommandProps| Member | Type | Summary |
|---|---|---|
| className? | string | |
| icon? | DocxEditorChildren | Icon override. Defaults to the row's own Material Symbol. |
| labelKey? | string | i18n key for the label, overriding the packaged one. |
| shortcutKey? | string | i18n key for the shortcut column, overriding the packaged one. |
ContextMenuContextValueinterfaceSource ↗
interface ContextMenuContextValue| Member | Type | Summary |
|---|---|---|
| anchor | ContextMenuAnchor | null | Non-null exactly while the panel is open. |
| clipboardRefusal | string | null | The browser's reason for refusing a clipboard READ, once one has actually been refused. |
| close | (restoreFocus?: boolean) => void | Close the panel. `restoreFocus` on the paths where the user is FINISHING with the menu (selecting a row); not on the ones where they are already going elsewhere. |
| reportClipboardRefusal | (reason: string) => void | |
| target | HTMLElement | null | The element the opening right-click landed on, captured AT OPEN TIME like [tocId](tocId). |
| tocId | string | null | The table of contents this open was over, captured AT OPEN TIME. |
ContextMenuItemPropsinterfaceSource ↗
Props for DocxEditor.ContextMenu.Item: a host-owned row.
interface ContextMenuItemProps| Member | Type | Summary |
|---|---|---|
| active? | boolean | Checked state, for a row that toggles. Leave undefined on a row that just acts. |
| className? | string | |
| disabled? | boolean | |
| disabledReason? | string | Tooltip when disabled. Say why — never invent a reason the engine did not give. |
| icon? | DocxEditorChildren | |
| label | string | Label, as a resolved STRING rather than an i18n key — the row belongs to the host's own action, so the host's own catalogue resolves it. The packaged rows go the other way. |
| onSelect? | () => void | |
| shortcut? | string | Right-aligned shortcut text, already resolved. |
ContextMenuTableRowPropsinterfaceSource ↗
Props for packaged table context-menu rows.
interface ContextMenuTableRowProps extends ContextMenuCommandProps| Member | Type | Summary |
|---|---|---|
| destructive? | boolean | When true, the row uses the destructive treatment. |
DialogCustomizationPropsinterfaceSource ↗
Layout customization for a packaged dialog.
interface DialogCustomizationProps| Member | Type | Summary |
|---|---|---|
| children? | DocxEditorChildren | |
| className? | string | |
| preset? | boolean | Render the default arrangement, replacing named children in place. Defaults to true. |
| style? | CSSProperties |
DialogPartPropsinterfaceSource ↗
Presentation overrides for a dialog part.
Anything beyond these members reaches the rendered element, so a part takes an id, an aria-* label or a data-* test hook. The part's own wiring wins every collision: a host cannot replace Apply's handler or its data-docx-part marker by passing one. To own the element and its handler outright, pass asChild and supply your own.
interface DialogPartProps| Member | Type | Summary |
|---|---|---|
| "aria-label"? | string | |
| (member-1) | | |
| asChild? | boolean | |
| children? | DocxEditorChildren | |
| className? | string | |
| id? | string | |
| style? | CSSProperties | |
| title? | string |
DocxEditorAuthorStylePropsinterfaceSource ↗
Props for DocxEditor.AuthorStyle: one author, and the [RevisionAuthorStyle](RevisionAuthorStyle) fields to apply — color (document ink and the review chrome's accent), background (the wash), activeBackground (the open change's band), spanClassName (classes on the painted spans), and avatarUrl.
interface DocxEditorAuthorStyleProps extends RevisionAuthorStyle| Member | Type | Summary |
|---|---|---|
| author | string | The author to style. Matches `w:author` exactly. |
DocxEditorBookmarkDialogPropsinterfaceSource ↗
Props for DocxEditor.BookmarkDialog.
interface DocxEditorBookmarkDialogProps extends DialogCustomizationProps| Member | Type | Summary |
|---|---|---|
| onClose | () => void | Called on Cancel, Escape, overlay click, and after a successful Add. |
| open | boolean | Whether the dialog is shown. The host owns this state. |
DocxEditorCompareDocumentsDialogPropsinterfaceSource ↗
Compare documents session and presentation.
interface DocxEditorCompareDocumentsDialogProps extends DialogCustomizationProps| Member | Type | Summary |
|---|---|---|
| session | CompareDocumentsDialogSession | null |
DocxEditorContentControlNamespaceinterfaceSource ↗
The content-control inspector compound. Parts live on the namespace statics.
interface DocxEditorContentControlNamespace| Member | Type | Summary |
|---|---|---|
| (member-0) | | |
| Fields | typeof ContentControlFields | |
| Header | typeof ContentControlHeader | |
| Remove | typeof ContentControlRemove |
DocxEditorContentControlWidgetNamespaceinterfaceSource ↗
The compound pop-up with its parts attached as statics.
interface DocxEditorContentControlWidgetNamespace| Member | Type | Summary |
|---|---|---|
| (member-0) | | |
| Apply | typeof ContentControlWidgetApply | |
| Calendar | typeof ContentControlWidgetCalendar | |
| Cancel | typeof ContentControlWidgetCancel | |
| Day | typeof ContentControlWidgetDay | |
| Error | typeof ContentControlWidgetError | |
| Footer | typeof ContentControlWidgetFooter | |
| Grid | typeof ContentControlWidgetGrid | |
| Header | typeof ContentControlWidgetHeader | |
| Input | typeof ContentControlWidgetInput | |
| Item | typeof ContentControlWidgetItem | |
| List | typeof ContentControlWidgetList | |
| Month | typeof ContentControlWidgetMonth | |
| Navigation | typeof ContentControlWidgetNavigation | |
| NextMonth | typeof ContentControlWidgetNextMonth | |
| Picture | typeof ContentControlWidgetPicture | |
| PreviousMonth | typeof ContentControlWidgetPreviousMonth | |
| Title | typeof ContentControlWidgetTitle | |
| Today | typeof ContentControlWidgetToday | |
| Weekdays | typeof ContentControlWidgetWeekdays | |
| Year | typeof ContentControlWidgetYear |
DocxEditorContentControlWidgetPartPropsinterfaceSource ↗
Presentation overrides for a value pop-up part.
Anything beyond these members reaches the rendered element, so a part takes an id, an aria-* label or a data-* test hook. The part's own wiring wins every collision. Pass asChild to own the element outright and keep its behavior.
interface DocxEditorContentControlWidgetPartProps| Member | Type | Summary |
|---|---|---|
| "aria-label"? | string | |
| (member-1) | | |
| (member-2) | | |
| asChild? | boolean | |
| children? | DocxEditorChildren | |
| className? | string | |
| id? | string | |
| style? | CSSProperties | |
| title? | string |
DocxEditorContentControlWidgetPropsinterfaceSource ↗
Value-widget session and optional replacement controls.
interface DocxEditorContentControlWidgetProps| Member | Type | Summary |
|---|---|---|
| children? | DocxEditorChildren | Replaces the packaged arrangement. Compose it from the compound's parts (`DocxEditorContentControlWidget.Calendar`, `.List`, …) or from `useContentControlWidget()`. |
| className? | string | |
| session | ContentControlWidgetSession | |
| style? | CSSProperties |
DocxEditorContentPropsinterfaceSource ↗
Props for DocxEditor.Content.
interface DocxEditorContentProps| Member | Type | Summary |
|---|---|---|
| children? | DocxEditorChildren | |
| className? | string | Appended after the load-bearing `docx-paginated-surface` class. |
DocxEditorContextMenuNamespaceinterfaceSource ↗
DocxEditor.ContextMenu with its rows attached as statics.
interface DocxEditorContextMenuNamespace| Member | Type | Summary |
|---|---|---|
| (member-0) | | |
| CellVerticalAlignment | typeof ContextMenuCellVerticalAlignment | |
| Copy | typeof ContextMenuCopy | |
| Cut | typeof ContextMenuCut | |
| Delete | typeof ContextMenuDelete | |
| DeleteTable | typeof ContextMenuDeleteTable | |
| DeleteTableColumn | typeof ContextMenuDeleteTableColumn | |
| DeleteTableRow | typeof ContextMenuDeleteTableRow | |
| Group | typeof MenuGroup | A named section of rows: a visible heading plus a real ARIA group. |
| InsertColumnLeft | typeof ContextMenuInsertColumnLeft | |
| InsertColumnRight | typeof ContextMenuInsertColumnRight | |
| InsertRowAbove | typeof ContextMenuInsertRowAbove | |
| InsertRowBelow | typeof ContextMenuInsertRowBelow | |
| Item | typeof ContextMenuItem | A host-owned row: no slot, no command, the host's own label and action. |
| MergeCells | typeof ContextMenuMergeCells | |
| Paste | typeof ContextMenuPaste | |
| PasteWithoutFormatting | typeof ContextMenuPasteWithoutFormatting | |
| RefreshToc | typeof ContextMenuRefreshToc | |
| RefreshTocPageNumbers | typeof ContextMenuRefreshTocPageNumbers | |
| RemoveToc | typeof ContextMenuRemoveToc | |
| Row | typeof MenuRow | Bare row presentation, for a host building something the parts do not cover. |
| SelectAll | typeof ContextMenuSelectAll | |
| SelectTable | typeof ContextMenuSelectTable | |
| Separator | typeof MenuSeparator | |
| Slot | typeof MenuItem | Any chrome slot as a live row (`<ContextMenu.Slot slotId="text.bold" />`). |
| SplitCell | typeof ContextMenuSplitCell | |
| Submenu | typeof MenuSubmenu |
DocxEditorContextMenuPropsinterfaceSource ↗
Props for DocxEditor.ContextMenu.
interface DocxEditorContextMenuProps| Member | Type | Summary |
|---|---|---|
| children? | DocxEditorChildren | |
| className? | string | Appended after the base `docx-contextmenu` class. |
| disabled? | boolean | `true` suppresses the panel entirely and lets the browser's own menu through. For a host that wants the native menu back on some documents without unmounting the part. |
| onOpenChange? | (open: boolean) => void | Notified whenever the panel opens or closes. |
| preset? | boolean | `false` renders children verbatim with no default set. Default `true`: a child naming a packaged row overrides it in place, others append. |
| t? | ToolbarTranslate | i18n resolver for row labels; without it the raw keys show (never English). |
DocxEditorDocumentOutlinePropsinterfaceSource ↗
Props for the context-fed outline part.
interface DocxEditorDocumentOutlineProps| Member | Type | Summary |
|---|---|---|
| leftOffset? | number | Left anchor (px) inside the panel's positioning container. |
| onClose? | () => void | Close-button handler; without one the panel simply stays open. |
| topOffset? | number | Vertical offset (px) inside the panel's positioning container. |
DocxEditorExportDialogPropsinterfaceSource ↗
State and presentation for the File menu export dialog.
interface DocxEditorExportDialogProps| Member | Type | Summary |
|---|---|---|
| children? | DocxEditorChildren | Replaces the default contents while retaining the modal and focus behavior. |
| className? | string | Additional class on the dialog element. |
| error | string | Localized failure text, or an empty string while conversion runs. |
| format | ChromeExportFormat | The format selected in File Export. |
| onClose | | Dismisses feedback without canceling the export. |
| open | boolean | Controls visibility when rendering the dialog directly. |
| pending | boolean | True while conversion runs. Closing the dialog does not cancel conversion. |
| style? | CSSProperties | Inline styles on the dialog element. |
DocxEditorFontNoticePropsinterfaceSource ↗
Props for DocxEditor.FontNotice.
interface DocxEditorFontNoticeProps| Member | Type | Summary |
|---|---|---|
| className? | string | Appended after the default notice classes. |
| style? | CSSProperties | Inline presentation overrides for the notice element. |
| t? | TFunction | Translator override; defaults to the ambient locale context. |
DocxEditorHeaderFooterChromePropsinterfaceSource ↗
Props for DocxEditor.HeaderFooterChrome.
interface DocxEditorHeaderFooterChromeProps| Member | Type | Summary |
|---|---|---|
| className? | string |
DocxEditorHyperLinkNamespaceinterfaceSource ↗
The link popover compound.
interface DocxEditorHyperLinkNamespace| Member | Type | Summary |
|---|---|---|
| (member-0) | | |
| Apply | typeof HyperLinkApply | |
| Cancel | typeof HyperLinkCancel | |
| Copy | typeof HyperLinkCopy | |
| Edit | typeof HyperLinkEdit | |
| Error | typeof HyperLinkError | |
| Fields | typeof HyperLinkFields | |
| Unlink | typeof HyperLinkUnlink | |
| Url | typeof HyperLinkUrl |
DocxEditorImageAltTextPopupPropsinterfaceSource ↗
State and actions for the image alt-text panel.
interface DocxEditorImageAltTextPopupProps| Member | Type | Summary |
|---|---|---|
| anchorRef? | RefObject<HTMLElement | null> | |
| className? | string | |
| id | string | |
| isEnabled | boolean | |
| onApply | | |
| onClose | | |
| onValueChange | | |
| value | string |
DocxEditorImageInsertErrorDialogPropsinterfaceSource ↗
Why a picture could not be inserted. Replace it through popups.imageInsertError, or pass false there to show nothing.
interface DocxEditorImageInsertErrorDialogProps| Member | Type | Summary |
|---|---|---|
| children? | DocxEditorChildren | Replaces the packaged header, message and button. |
| className? | string | |
| message | string | The translated reason the picture was refused. |
| onClose | | Close the dialog. |
| style? | CSSProperties |
DocxEditorImagePropertiesDialogPropsinterfaceSource ↗
Props for DocxEditor.ImagePropertiesDialog.
interface DocxEditorImagePropertiesDialogProps| Member | Type | Summary |
|---|---|---|
| className? | string | |
| onClose | () => void | |
| open | boolean | |
| triggerRef? | RefObject<HTMLElement | null> |
DocxEditorInvalidTextFormFieldDialogPropsinterfaceSource ↗
Invalid-value acknowledgement with editor-owned clearing and focus restoration.
interface DocxEditorInvalidTextFormFieldDialogProps| Member | Type | Summary |
|---|---|---|
| children? | DocxEditorChildren | |
| className? | string | |
| session | InvalidTextFormFieldSession | |
| style? | CSSProperties |
DocxEditorLoadingComponentinterfaceSource ↗
The loading part with the packaged spinner attached as a static.
interface DocxEditorLoadingComponent| Member | Type | Summary |
|---|---|---|
| (member-0) | | Renders the loading screen, or nothing once a document is available. |
| Spinner | typeof DocxEditorLoadingSpinner | The packaged indicator, for composing into custom children. |
DocxEditorLoadingPropsinterfaceSource ↗
Props for DocxEditor.Loading.
interface DocxEditorLoadingProps| Member | Type | Summary |
|---|---|---|
| children? | DocxEditorChildren | The whole first loading screen, in place of the packaged page. Compose your own around `DocxEditor.Loading.Spinner` to keep the packaged indicator beside your own copy. To change only the indicator, and keep it below the laid-out pages as the document opens, use `indicator`. |
| className? | string | Appended after the load-bearing `docx-editor docx-editor__loading` classes. |
| indicator? | DocxEditorChildren | Your own loading indicator, in place of the packaged spinner. The packaged screen keeps its page and centers this on it. With `overlay`, it then moves below the laid-out pages while a large document lays out its remaining pages, and scrolls with them. |
| overlay? | boolean | Render as an opaque overlay pinned over the nearest positioned ancestor, covering the previous document while the next one opens. This is the shape for the big-file case: a large document mounts behind one painted frame, and the overlay is what that frame shows. It carries a short appearance delay, so an open that finishes quickly never flashes it. Compose it INSIDE a positioned box (the packaged frame puts it in the workspace row); without `overlay` the part is an in-flow box that fills whatever the host gives it. |
| style? | CSSProperties | Inline styles for the loading container, as on `DocxEditor.Viewport`. |
| when? | boolean | An extra host-owned condition, OR-ed with the editor's own. OPTIONAL: the default already holds the screen up while the editor has nothing painted, including a `DocxEditor.Root` mounted before its document arrives. Pass this for state the editor cannot see — bytes still downloading, fonts not settled — when you mount the provider only after those resolve. |
DocxEditorLoadingSpinnerPropsinterfaceSource ↗
Props for DocxEditor.Loading.Spinner.
interface DocxEditorLoadingSpinnerProps| Member | Type | Summary |
|---|---|---|
| className? | string | Appended after the load-bearing `docx-editor__loading-spinner` class. |
DocxEditorMenuNamespaceinterfaceSource ↗
The menu bar with its parts attached as statics.
interface DocxEditorMenuNamespace| Member | Type | Summary |
|---|---|---|
| (member-0) | | |
| Bookmark | typeof MenuBookmark | |
| Entry | typeof MenuEntry | One registry entry as its row, for a host arranging registry data itself. |
| ExportMarkdown | typeof MenuExportMarkdown | |
| ExportPdf | typeof MenuExportPdf | |
| File | MenuPartComponent | |
| Format | MenuPartComponent | |
| Group | typeof MenuGroup | A named section of rows: a visible heading plus a real ARIA group. |
| Help | MenuPartComponent | |
| ImageInsert | typeof MenuImageInsert | Insert › Image, so a host can hide it or place it elsewhere by name. |
| Insert | MenuPartComponent | |
| Item | typeof MenuItem | One chrome slot as a live row. |
| Menu | typeof Menu | A menu of the bar, addressed by registry id. |
| Open | typeof MenuOpen | |
| PageSetup | typeof MenuPageSetup | |
typeof MenuPrint | ||
| ReportIssue | typeof MenuReportIssue | Help › Report issue, so a host can drop it or point it elsewhere by name. |
| Review | typeof MenuReview | |
| Reviewers | typeof MenuReviewers | Review Markup Options Reviewers. |
| Row | typeof MenuRow | A presentational row, for a host action that is not a chrome slot. |
| Save | typeof MenuSave | |
| Separator | typeof MenuSeparator | |
| Submenu | typeof MenuSubmenu | |
| TableGrid | typeof MenuTableGrid | Word's 6×6 insert-table size picker. |
| Watermark | typeof MenuWatermark | Insert › Watermark, so a host can hide it or place it elsewhere by name. |
DocxEditorMenuPropsinterfaceSource ↗
Props for DocxEditor.Menu.
interface DocxEditorMenuProps| Member | Type | Summary |
|---|---|---|
| children? | DocxEditorChildren | |
| className? | string | Appended after the base `docx-menubar` class. |
| exporters? | ChromeExportHandlers | Converter handlers. Markdown requires docx-to-markdown; PDF requires docx-to-pdf on Node.js. File Print also uses the PDF handler. Missing handlers show an error. |
| fileName? | string | Name for the file the packaged Save writes, without the extension. Ignored when `onSave` is given. |
| onOpen? | () => void | Replaces File › Open. The default opens a file picker and hands the bytes to `Editor.load` — a user-driven file READ, never a fetch. |
| onOpenFile? | (file: File) => void | Fired when the packaged Open reads a file, before its bytes are loaded — so a host can reflect the file's name in its own title chrome. Not fired when `onOpen` replaced the packaged picker: the host is reading the file itself and already holds the name. |
| onPageSetup? | () => void | Owns Page Setup opening when `popups.pageSetup` is omitted. Use `popups` to customize its UI. |
| onReportIssue? | () => void | Replaces Help › Report issue. The default opens THIS project's issue tracker, prefilled with the current page URL and user agent — so a host embedding the editor in its own product should point this at its own support channel, or drop the row with `reportIssue={false}`. |
| onSave? | () => void | Replaces File › Save. The default runs `Editor.save()` and downloads the bytes. |
| overflow? | boolean | What the bar does when its menus do not fit on one line. Default `true`: the bar stays one line, measures its menus, and moves the ones that do not fit, from the end, into one "⋯" menu, where each becomes a submenu with the same rows. `false` lets the bar wrap onto more lines instead. |
| preset? | boolean | `false` renders children verbatim with no default arrangement. Default `true`: menu children override their menu in place, others append. |
| printSettings? | boolean | Whether File Print first asks which markup to print and whether comments print. Defaults to `true` with the packaged print dialog. A custom `popups.print` component opts in with `true` and renders the `choosing` state, or `DocxEditor.PrintDialog` without children. `popups.print: false` prints the current view without asking. |
| reportIssue? | boolean | `false` removes Help › Report issue, and the Help menu with it. Default `true`. |
| t? | ToolbarTranslate | i18n resolver for row labels; without it the raw keys show (never English). |
DocxEditorNamespaceinterfaceSource ↗
The composed editor component with its composition primitives attached as statics, so <DocxEditor.Root>, <DocxEditor.Viewport>, and <DocxEditor.Content> work without extra imports.
interface DocxEditorNamespace extends ForwardRefExoticComponent<DocxEditorProps & RefAttributes<DocxEditorRef>>| Member | Type | Summary |
|---|---|---|
| AuthorStyle | typeof DocxEditorAuthorStyle | |
| BookmarkDialog | typeof DocxEditorBookmarkDialog | Bookmark dialog — list, add, delete and go to bookmarks. |
| ColorByChangeType | typeof DocxEditorColorByChangeType | |
| CompareDocumentsDialog | typeof DocxEditorCompareDocumentsDialog | |
| Content | typeof DocxEditorContent | |
| ContentControl | typeof DocxEditorContentControl | |
| ContentControlWidget | typeof DocxEditorContentControlWidget | The content-control inspector — alias, tag, type, lock, placeholder, bound — and remove-keeping-content. Mounted by default inside the viewport; opens from the `contentControl.inspector` chrome slot. |
| ContextMenu | typeof ContextMenu | The right-click menu over the painted document, with its rows as statics (`.Cut`, `.Copy`, `.Paste`, `.Delete`, `.SelectAll`, `.Item`, `.Slot`, `.Submenu`, …). Mounted by default inside the viewport; `contextMenu={false}` removes it and lets the browser's own menu through. |
| DocumentOutline | typeof DocxEditorDocumentOutline | Context-fed heading outline over `Editor.getOutline()`. |
| Equation | typeof DocxEditorEquation | The default linear-math popover for a clicked Office Math equation. |
| ExportDialog | typeof DocxEditorExportDialog | File export progress and errors, configured through popups.export. |
| FontNotice | typeof DocxEditorFontNotice | Word-style notice when document fonts render in substitute faces. |
| HeaderFooterChrome | typeof DocxEditorHeaderFooterChrome | Header/footer scope chrome while editing page furniture. |
| HorizontalRuler | typeof DocxEditorHorizontalRuler | Context-fed horizontal ruler with draggable margins (props-driven export stays). |
| HyperLink | typeof DocxEditorHyperLink | The link popover — target readout, copy, edit, unlink — and its parts. Mounted by default inside the viewport; `hyperlinkPopup={false}` removes it. |
| ImageAltTextPopup | typeof DocxEditorImageAltTextPopup | |
| ImagePropertiesDialog | typeof DocxEditorImagePropertiesDialog | |
| InvalidTextFormFieldDialog | typeof DocxEditorInvalidTextFormFieldDialog | |
| Loading | typeof DocxEditorLoading | Conditional loading screen: renders while there is no document to paint. |
| Menu | typeof DocxEditorMenu | The menu bar — File · Format · Insert · Help — with its parts as statics (`.File`, `.Format`, `.Insert`, `.Help`, `.Item`, `.Row`, `.Submenu`, `.TableGrid`, …). Mounted by default under the title; `menu={false}` removes it. |
| Navigation | typeof Navigation | The navigation pane — Headings and Find — with its parts as statics (`.Header`, `.Close`, `.Title`, `.Tabs`, `.Tab`, `.Headings`, `.Find`, `.Toggle`). Mounted by default; `navigation={false}` removes it. |
| NotePreview | typeof DocxEditorNotePreview | |
| NotePropertiesDialog | typeof DocxEditorNotePropertiesDialog | |
| NotesChrome | typeof DocxEditorNotesChrome | |
| NotesContextMenu | typeof DocxEditorNotesContextMenu | |
| OpenFailure | typeof DocxEditorOpenFailure | The dialog that explains a file the editor refused to open. Mounted by default; `openFailure={false}` removes it. |
| PageNumber | typeof DocxEditorPageNumber | Floating localized page readout for the active viewport. |
| PageSetupDialog | typeof DocxEditorPageSetupDialog | Page Setup dialog — size, orientation, margins — applied as one undo step. |
| ParagraphDialog | typeof DocxEditorParagraphDialog | |
| PrintDialog | typeof DocxEditorPrintDialog | File print progress and errors, configured through popups.print. |
| RevisionMarkup | typeof DocxEditorRevisionMarkup | |
| RevisionMarkupDialog | typeof DocxEditorRevisionMarkupDialog | |
| Root | typeof DocxEditorRoot | |
| SplitCellDialog | typeof DocxEditorSplitCellDialog | Split cells dialog — split the cell at the selection into columns and rows. |
| TextFormFieldDialog | typeof DocxEditorTextFormFieldDialog | The Paragraph dialog: alignment, indentation, spacing and the paragraph flags. |
| Toolbar | typeof DocxEditorToolbar | |
| UnsupportedElement | typeof DocxEditorUnsupportedElement | |
| VerticalRuler | typeof DocxEditorVerticalRuler | Context-fed vertical ruler with draggable margins (props-driven export stays). |
| Viewport | typeof DocxEditorViewport | |
| WatermarkDialog | typeof DocxEditorWatermarkDialog | Watermark dialog — none, picture or text — applied as one undo step. |
| Window | typeof DocxEditorWindow | The editor panel in a pop-out window while `open`; see the pop-out guide. |
DocxEditorNavigationNamespaceinterfaceSource ↗
DocxEditor.Navigation with its parts attached as statics.
interface DocxEditorNavigationNamespace| Member | Type | Summary |
|---|---|---|
| (member-0) | | |
| Close | typeof NavigationClose | |
| Find | typeof NavigationFind | |
| GoTo | typeof NavigationGoTo | |
| Header | typeof NavigationHeader | |
| Headings | typeof NavigationHeadings | |
| Tab | typeof NavigationTab | |
| Tabs | typeof NavigationTabs | |
| Title | typeof NavigationTitle | |
| Toggle | typeof NavigationToggle |
DocxEditorNavigationPropsinterfaceSource ↗
Props for DocxEditor.Navigation.
interface DocxEditorNavigationProps extends UseNavigationPaneOptions| Member | Type | Summary |
|---|---|---|
| children? | DocxEditorChildren | Replaces the default composition (header, tabs, both panels). |
| className? | string | |
| findShortcut? | boolean | Whether Ctrl+F (Cmd+F on macOS) opens the pane on the Find tab. Defaults to `true`. The shortcut applies only while focus is in this editor, so the rest of the page keeps the browser's own search. Set `false` to leave the shortcut to the browser everywhere. |
| goToShortcut? | boolean | Whether Ctrl+G (Cmd+Option+G on macOS) opens the pane on the Go to tab. Defaults to `true`, and applies only while focus is in this editor. The `openGoTo` editor command opens the tab either way. |
| searchHighlight? | DocumentSearchHighlight | Which Find matches to highlight while the Find tab is open: `'all'` (default), `'active'`, or `'none'`. The pane stops requesting highlights when it closes or leaves the tab; another `useDocumentSearch` consumer can still request them. |
| style? | CSSProperties | |
| t? | (key: string, params?: Record<string, string | number>) => string | Label resolver. Defaults to the `translate` given to `DocxEditor.Root`, and for keys it leaves unresolved, to the active `LocaleContext` catalogue (bundled English unless a provider swapped it). |
| toggle? | boolean | NavigationPartProps | The collapsed disc button. `false` removes it; an OBJECT is props for the packaged one, so a host can give it a class without restyling the library's. |
DocxEditorNotePreviewPropsinterfaceSource ↗
Note hover preview content and viewport coordinates.
interface DocxEditorNotePreviewProps| Member | Type | Summary |
|---|---|---|
| className? | string | |
| scopeId | string | |
| text | string | |
| x | number | |
| y | number |
DocxEditorNotePropertiesDialogPropsinterfaceSource ↗
Properties actions for a note settings dialog.
interface DocxEditorNotePropertiesDialogProps| Member | Type | Summary |
|---|---|---|
| onApply | (command: EditorCommand) => void | |
| onClose | () => void |
DocxEditorNotesChromePropsinterfaceSource ↗
Props for DocxEditor.NotesChrome.
interface DocxEditorNotesChromeProps| Member | Type | Summary |
|---|---|---|
| className? | string |
DocxEditorNotesContextMenuPropsinterfaceSource ↗
Note menu target, viewport coordinates, command gates, and actions.
interface DocxEditorNotesContextMenuProps| Member | Type | Summary |
|---|---|---|
| className? | string | |
| convertAllDisabledReason? | string | |
| convertAllEnabled | boolean | |
| convertDisabledReason? | string | |
| convertEnabled | boolean | |
| deleteDisabledReason? | string | |
| deleteEnabled | boolean | |
| noteId | number | |
| noteKind | 'footnote' | 'endnote' | |
| onClose | | |
| onConvert | | |
| onConvertAll | | |
| onDelete | | |
| onOpenProperties | | |
| scopeId | string | |
| x | number | |
| y | number |
DocxEditorOpenFailureActionPropsinterfaceSource ↗
Props for DocxEditor.OpenFailure.Action.
interface DocxEditorOpenFailureActionProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'>| Member | Type | Summary |
|---|---|---|
| asChild? | boolean | Render your own element, such as a link, with the button's classes and handler. |
| children? | DocxEditorChildren | |
| dismiss? | boolean | Close the dialog after `onClick` runs, unless the handler called `preventDefault()`. |
| variant? | 'primary' | 'secondary' | `primary` is filled, `secondary` is outlined. Defaults to `secondary`. |
DocxEditorOpenFailureComponentinterfaceSource ↗
The open-failure part with its button attached as a static.
interface DocxEditorOpenFailureComponent| Member | Type | Summary |
|---|---|---|
| (member-0) | | Renders the dialog while a refused open is waiting, and nothing otherwise. |
| Action | typeof DocxEditorOpenFailureAction | A button styled for the dialog, for `actions` and custom `children`. |
DocxEditorOpenFailureContextinterfaceSource ↗
What actions and children receive.
interface DocxEditorOpenFailureContext| Member | Type | Summary |
|---|---|---|
| dismiss | | Close the dialog. It calls `onDismiss`, as **Close** does. |
| failure | DocumentOpenFailure | The refused open: its stable `code` and its `reason`. |
| message | string | The packaged, translated message for the failure. |
DocxEditorOpenFailurePropsinterfaceSource ↗
Props for DocxEditor.OpenFailure.
interface DocxEditorOpenFailureProps| Member | Type | Summary |
|---|---|---|
| actions? | (context: DocxEditorOpenFailureContext) => DocxEditorChildren | Your own buttons, before **Close**. Build them from `DocxEditor.OpenFailure.Action` so they match the dialog. The dialog shows no contact of its own. |
| children? | (context: DocxEditorOpenFailureContext) => DocxEditorChildren | Your own dialog content, in place of the packaged header, body and footer. The dialog frame, its focus handling and Escape stay. |
| className? | string | Appended after the load-bearing `docx-dialog` class. |
| closeLabel? | string | The label of the **Close** button. Defaults to the translated `common.close`. |
| message? | DocxEditorOpenFailureMessage | Your own message in place of the packaged one, as content or per failure. |
| onDismiss? | (failure: DocumentOpenFailure) => void | Called after the person closes the dialog, by any route. |
| showClose? | boolean | Show the packaged **Close** button. Defaults to `true`. Turn it off only when `actions` gives a way out. Escape still closes the dialog. |
| showCode? | boolean | Show the stable error code under the message. Defaults to `true`. |
| style? | CSSProperties | Inline styles for the dialog element. |
| t? | TFunction | Translator override; defaults to the ambient locale context. |
| title? | string | The dialog title. Defaults to the translated `openFailure.title`. It also names the dialog for screen readers, including when your own content replaces the packaged one. |
DocxEditorPageNumberPropsinterfaceSource ↗
Props for DocxEditor.PageNumber.
interface DocxEditorPageNumberProps| Member | Type | Summary |
|---|---|---|
| className? | string | Appended after the default page-number classes. |
| style? | CSSProperties | Inline presentation overrides for the indicator element. |
DocxEditorPageSetupDialogPropsinterfaceSource ↗
Props for DocxEditor.PageSetupDialog.
interface DocxEditorPageSetupDialogProps extends DialogCustomizationProps| Member | Type | Summary |
|---|---|---|
| onClose | () => void | Called on Cancel, Escape, overlay click, and after a successful Apply. |
| open | boolean | Whether the dialog is shown. The host owns this state. |
DocxEditorParagraphDialogPropsinterfaceSource ↗
Props for DocxEditor.ParagraphDialog.
interface DocxEditorParagraphDialogProps extends DialogCustomizationProps| Member | Type | Summary |
|---|---|---|
| onClose | () => void | Called on Cancel, Escape, overlay click, and after a successful OK. |
| open | boolean | Whether the dialog is shown. The host owns this state. |
DocxEditorPopupsinterfaceSource ↗
Render overrides for automatically mounted editor popups. false disables automatic rendering.
interface DocxEditorPopups| Member | Type | Summary |
|---|---|---|
| bookmark? | DocxEditorPopup<DocxEditorBookmarkDialogProps> | The Bookmark dialog the Insert menu and Ctrl/Cmd+Shift+F5 open. |
| compareDocuments? | DocxEditorPopup<DocxEditorCompareDocumentsDialogProps> | The Compare documents dialog the Review menu opens. Requires the review module. |
| contentControl? | DocxEditorPopup<ContentControlProps> | |
| contentControlCheckbox? | DocxEditorPopup<DocxEditorContentControlWidgetProps> | Renderer for checkbox presses. Omitted, the engine toggles the box itself and `contentControlWidget` never sees a checkbox session. Configure it to confirm, refuse or restyle the toggle; `DocxEditorContentControlWidget` without children applies it at once. |
| contentControlPicture? | DocxEditorPopup<DocxEditorContentControlWidgetProps> | Renderer for picture presses. Omitted, the engine opens its own file picker and `contentControlWidget` never sees a picture session. Configure it to pick from your own source; `DocxEditorContentControlWidget` without children opens a file picker at once. |
| contentControlWidget? | DocxEditorPopup<DocxEditorContentControlWidgetProps> | |
| contextMenu? | DocxEditorPopup<DocxEditorContextMenuProps> | |
| equation? | DocxEditorPopup<Record<string, never>> | |
| export? | DocxEditorPopup<DocxEditorExportDialogProps> | File export progress and errors. False hides feedback without stopping conversion. |
| hyperlink? | DocxEditorPopup<HyperLinkProps> | |
| imageAltText? | DocxEditorPopup<DocxEditorImageAltTextPopupProps> | |
| imageInsertError? | DocxEditorPopup<DocxEditorImageInsertErrorDialogProps> | Why a chosen or pasted picture could not be inserted. False shows nothing. |
| imageProperties? | DocxEditorPopup<DocxEditorImagePropertiesDialogProps> | |
| invalidTextFormField? | DocxEditorPopup<DocxEditorInvalidTextFormFieldDialogProps> | |
| notePreview? | DocxEditorPopup<DocxEditorNotePreviewProps> | |
| noteProperties? | DocxEditorPopup<DocxEditorNotePropertiesDialogProps> | |
| notesContextMenu? | DocxEditorPopup<DocxEditorNotesContextMenuProps> | |
| pageSetup? | DocxEditorPopup<DocxEditorPageSetupDialogProps> | |
| paragraph? | DocxEditorPopup<DocxEditorParagraphDialogProps> | |
| print? | DocxEditorPopup<DocxEditorPrintDialogProps> | File print progress and errors. False hides feedback; printing still runs. |
| revisionMarkup? | DocxEditorPopup<DocxEditorRevisionMarkupDialogProps> | |
| splitCell? | DocxEditorPopup<DocxEditorSplitCellDialogProps> | The Split cells dialog the table context menu and toolbar open. |
| textFormField? | DocxEditorPopup<DocxEditorTextFormFieldDialogProps> | |
| watermark? | DocxEditorPopup<DocxEditorWatermarkDialogProps> | The Watermark dialog the Insert menu opens. Pass `presets` here to change its text choices. |
DocxEditorPrintDialogPropsinterfaceSource ↗
State and presentation for the File menu print dialog.
interface DocxEditorPrintDialogProps| Member | Type | Summary |
|---|---|---|
| children? | DocxEditorChildren | Replaces the default contents while retaining the modal and focus behavior. |
| choosing? | boolean | True while the dialog shows print settings, before conversion starts. Present only when the menu's `printSettings` step is on. |
| className? | string | Additional class on the dialog element. |
| error | string | Localized failure text, or an empty string. |
| onClose | | Closes the dialog. While `pending` is true, closing also cancels printing. |
| onPrint? | () => void | Starts conversion with `settings`. |
| onSettingsChange? | (change: ChromePrintSettings) => void | Changes one or both settings. |
| open | boolean | Controls visibility when rendering the dialog directly. |
| pending | boolean | True while the PDF handler converts the document. |
| settings? | ResolvedChromePrintSettings | The settings the form shows. |
| style? | CSSProperties | Inline styles on the dialog element. |
| url | string | An object URL for the converted PDF when printing failed after conversion, such as in a browser without a PDF viewer. Otherwise an empty string. The default dialog links only to `blob:` URLs. |
DocxEditorPropsinterfaceSource ↗
Props for the React DocxEditor. The adapter is a thin renderer over the Editor contract; it holds no editing-engine state of its own and never imports ProseMirror or OOXML feature logic.
interface DocxEditorProps| Member | Type | Summary |
|---|---|---|
| author? | string | |
| children? | DocxEditorChildren | Extra chrome rendered INSIDE the viewport, after the painted pages — the slot pro or host chrome mounts into without leaving the sugar (e.g. `DocxEditorReview` from `@docx-editor.dev/pro/react`). For more control, compose `DocxEditor.Root`/`Viewport`/`Content` directly. |
| chrome? | boolean | Renders the packaged chrome — title bar and toolbar — around the document. Default `true`. Set `false` for the painted surface alone when the host supplies its own chrome; the composition primitives (`Root` / `Viewport` / `Content`) are the better starting point if you are replacing more than the frame. |
| className? | string | |
| colorMode? | 'light' | 'dark' | 'system' | Chrome colour mode. `'system'` follows the OS and re-resolves when it changes. Only the editor CHROME is themed — the document canvas stays Word-faithful. |
| contentLockPolicy? | ContentLockPolicy | Opt-in relaxation of content-control locks. With `allowFormattingInLockedContent: true`, readers can format `contentLocked` and `sdtContentLocked` controls while their text stays protected. Read once, when the editor is created: a later change in value is ignored, with a development warning. |
| contextMenu? | boolean | DocxEditorContextMenuProps | Render the packaged right-click menu (`false` removes it, restoring the browser's own). |
| document? | DocumentSource | A document to load: DOCX bytes, `'blank'` for an empty one, or an existing handle. Omitting it mounts NO document, which is not the same as an empty one. |
| fieldResults? | FieldResultsMode | How the reader edits saved field results. `'atomic'` (the default) keeps every field one unit. `'editable'` allows typing, deletion, and selection inside the saved result of a DATE, MERGEFIELD, HYPERLINK, or similar field. Read once, when the editor is created: a later change is ignored, with a development warning. Refused with a collaboration module. |
| fonts? | FontConfiguration | FontConfigurationFragment | FontResolver | Font sources for layout and paint. A new value replaces the fonts in place, keeping the document, selection and undo history; keep the reference stable across renders. |
| fontShaping? | FontShapingOptions | Explicit shaping byte ceiling. A changed maxFontBytes value remounts; equal values keep the instance. |
| hyperlinkPopup? | boolean | Render the packaged hyperlink popover (`false` removes it). |
| i18n? | Translations | The chrome's language: a locale from `@docx-editor.dev/i18n` (or your own partial over English). Keys the locale leaves out fall back to English rather than showing the key. |
| imageDecodePort? | ImageDecodePort | Inject image decoding and preserved-image conversion. A changed port identity remounts the editor. |
| loadingIndicator? | DocxEditorChildren | Your own loading indicator, in place of the packaged spinner. It shows centered on a blank page before the document arrives, then on the document's first page while a large document lays out its remaining pages, and scrolls with it. Include text for screen readers, as the packaged indicator does. Requires `chrome`; without it, compose `DocxEditor.Loading` yourself. |
| locale? | string | BCP-47 locale for regional date input and engine-generated labels. Defaults to en-US. Changes apply to subsequent edits without a remount; stored date formats are preserved. UI translations are supplied separately through i18n. |
| lockedControlNavigation? | LockedControlNavigation | How the caret moves through an inline content control whose content is locked. `'characters'` (the default) walks through its characters, as Word does. `'atomic'` makes the control one caret unit. Read once, when the editor is created: a later change is ignored, with a development warning. |
| menu? | boolean | DocxEditorMenuProps | The packaged menu bar — File · Format · Insert · Help — under the document title. |
| mode? | EditorMode | The host mode, matching the toolbar's three-state pill. Changes apply without a remount. |
| modules? | readonly EditorModule[] | Capability modules to register (`@docx-editor.dev/pro`'s review module, custom nodes). Applied at mount only. |
| navigation? | boolean | DocxEditorNavigationProps | Render the packaged navigation pane — headings and find — over the document's left gutter (`false` removes it and its toggle). |
| onChange? | (change: DocumentChange) => void | Fired when the document changes (revision + identity deltas, not bytes). |
| onFontError? | (error: EditorFontError) => void | Fired with the same typed font failure shown by the accessible alert UI. |
| onOpen? | () => void | Open handler for the menu's File › Open row. |
| onReady? | (editor: Editor) => void | Fired after the underlying `Editor` is created. |
| onRevisionMarkupChange? | (settings: ResolvedRevisionMarkup) => void | Receives proposed settings from API or dialog changes, excluding prop reconciliation. |
| onSave? | () => void | Save handler for the chrome's save control and the menu's File › Save row. Runs `Editor.save()` at the host. |
| onTitleChange? | (title: string) => void | Called when the title is edited. Omitting it makes the title read-only. |
| openFailure? | boolean | DocxEditorOpenFailureProps | The dialog that explains a file the editor refused to open, on by default. A refused open leaves the pages blank, so without it the reader sees nothing. |
| popups? | DocxEditorPopups | Customize automatically mounted popups. Set an entry to false for manual ownership. |
| renderOpenFailureActions? | (context: DocxEditorOpenFailureContext) => DocxEditorChildren | Your own buttons in the dialog for a file that does not open, before **Close**. Build them from `DocxEditor.OpenFailure.Action`. It is the same as `openFailure.actions`; pass only one. With `openFailure={false}` there is no dialog, so it renders nothing. |
| renderTitleBarLeft? | () => DocxEditorChildren | Title-bar slots. The host owns what goes here — brand lockup, switchers, theme toggle, Open/New/Save controls — and passes them in; the editor renders them verbatim on either side of the document title. |
| renderTitleBarRight? | () => DocxEditorChildren | |
| reviewDisplayMode? | ReviewDisplayMode | Initial revision display mode. |
| revisionMarkup? | RevisionMarkupOptions | Controlled viewer markup settings. Omitted fields use defaults. Save callback values into this prop to accept API and dialog changes. Omit this prop for uncontrolled settings. Use one configuration source. |
| rulers? | boolean | Horizontal and vertical rulers, on by default with the packaged chrome. |
| t? | (key: string, params?: Record<string, string | number>) => string | Resolves i18n keys for the editor chrome. |
| title? | string | Document title shown in the chrome's title bar. |
| zoom? | number | A fixed scale. Supplying one also makes the mode fixed unless `zoomMode` says otherwise. |
| zoomMode? | ZoomMode | 'auto' | Where the scale comes from. Defaults to `'auto'`: fit the page width, between 50% and 100%. A fit tracks the room beside the page, so opening comments shrinks the document instead of pushing it off screen; past the floor it scrolls sideways instead. `{ type: 'fixed' }` opts out. |
DocxEditorRefinterfaceSource ↗
The imperative handle, identical on both adapters (enforced by bun run check:parity-contract). Every member forwards to the Editor facade and is safe to call before the editor has mounted — mutations no-op, reads return the honest empty answer (null, a notFound refusal, a loading snapshot) — so a host can hold the ref from first render without guarding it.
The ref deliberately stays small: everything else (zoom, paging, formatting queries, document state) is reachable through the full facade via getEditor, so the ref never mirrors capabilities the Editor contract already names.
interface DocxEditorRef| Member | Type | Summary |
|---|---|---|
| exec | | Run a typed command through the facade; refused with `notFound` before mount. |
| focus | | |
| getDocumentHandle | | Identity and revision of the loaded document; `null` before mount. |
| getEditor | | The full `Editor` facade for advanced callers; `null` before mount. |
| load | | Load a document: DOCX bytes, `'blank'` for an empty one, or an existing handle. No-op before mount. |
| save | | Serialize the current document; `null` when no editor is mounted. |
| snapshot | | The current read model; a loading, non-editable snapshot before mount. |
DocxEditorRevisionMarkupDialogPropsinterfaceSource ↗
Revision markup session and presentation.
interface DocxEditorRevisionMarkupDialogProps extends DialogCustomizationProps| Member | Type | Summary |
|---|---|---|
| session | RevisionMarkupDialogSession | null |
DocxEditorRevisionMarkupPropsinterfaceSource ↗
Viewer-local markup declarations.
interface DocxEditorRevisionMarkupProps extends RevisionMarkupOptions| Member | Type | Summary |
|---|---|---|
| onRevisionMarkupChange? | (settings: ResolvedRevisionMarkup) => void |
DocxEditorRootListenersinterfaceSource ↗
Vue-only lifecycle listeners; exported for cross-adapter API parity.
interface DocxEditorRootListeners| Member | Type | Summary |
|---|---|---|
| onChange? | (change: DocumentChange) => void | |
| onFontError? | (error: EditorFontError) => void | |
| onReady? | (editor: Editor) => void | |
| onRevisionMarkupChange? | (settings: ResolvedRevisionMarkup) => void |
DocxEditorRootPropsinterfaceSource ↗
Props for DocxEditor.Root. document and imageDecodePort identity changes remount the editor. Changing fontShaping.maxFontBytes also remounts. Later fonts, author, locale, mode, translate, zoom, and zoomMode changes use instance setters, so edits, selection and undo history survive them. modules is sampled at mount only.
interface DocxEditorRootProps| Member | Type | Summary |
|---|---|---|
| author? | string | Author for later comments, replies, and tracked changes. Changes apply without a remount. |
| children? | DocxEditorChildren | |
| colorMode? | 'light' | 'dark' | 'system' | Colour theme of the composed chrome, as on `<DocxEditor>`. `'dark'` puts `.dark` beside `.docx-editor` on every part that scopes itself (toolbar, menu bar, viewport, dialogs), and `'system'` follows the OS setting as it changes. Defaults to `'light'`. The page content in the viewport is shown inverted in dark mode, as in `<DocxEditor>`. Changes apply without a remount. |
| contentLockPolicy? | ContentLockPolicy | Opt-in relaxation of content-control locks. With `allowFormattingInLockedContent: true`, readers can format `contentLocked` and `sdtContentLocked` controls while their text stays protected. Read once, when the editor is created: a later change in value is ignored, with a development warning. |
| document? | DocumentSource | A document to load: DOCX bytes, `'blank'` for an empty one, or an existing handle. Identity change remounts; `'blank'` is a constant, so holding it across renders does not. Omitting this mounts NO document, which is not the same as an empty one. |
| fieldResults? | FieldResultsMode | How the reader edits saved field results. `'atomic'` (the default) keeps every field one unit. `'editable'` allows typing, deletion, and selection inside the saved result of a DATE, MERGEFIELD, HYPERLINK, or similar field. Read once, when the editor is created: a later change is ignored, with a development warning. Refused with a collaboration module. |
| fonts? | FontConfiguration | FontConfigurationFragment | FontResolver | Font bytes for Word-accurate (HarfBuzz-shaped) wrap and pagination. Omitted, layout uses a fixed-width estimate; fonts embedded in the document are wired automatically either way. Pass `await loadDefaultFonts()` from `@docx-editor.dev/fonts` for Word's default faces — a bare fragment is accepted — or compose several origins with `composeFontConfiguration`. An identity change replaces the fonts in place (`setFonts`), keeping the document, selection and undo history; keep the reference stable across renders. Failures degrade to the fixed measurer and report through `onFontError`. |
| fontShaping? | FontShapingOptions | Explicit shaping byte ceiling; a changed maxFontBytes value remounts. |
| imageDecodePort? | ImageDecodePort | Optional decode port for embedded image insertion and paint in tests or custom hosts. |
| locale? | string | BCP-47 locale for regional date input and engine-generated labels. Defaults to en-US. Changes apply to subsequent edits without a remount; stored date formats are preserved. For UI translations, wrap Root and its chrome in LocaleProvider with an i18n catalog. |
| lockedControlNavigation? | LockedControlNavigation | How the caret moves through an inline content control whose content is locked. `'characters'` (the default) walks through its characters, as Word does. `'atomic'` makes the control one caret unit. Read once, when the editor is created: a later change is ignored, with a development warning. |
| mode? | 'edit' | 'view' | 'suggesting' | The host mode, matching the toolbar's three-state pill. Changes apply without a remount. |
| modules? | readonly EditorModule[] | Capability modules to register (`@docx-editor.dev/pro`'s review module, custom nodes, collaboration). Sampled at mount only because registration is construction-time. |
| onChange? | (change: DocumentChange) => void | Fired when the document changes (revision + identity deltas, not bytes). |
| onFontError? | (error: EditorFontError) => void | Fired with the typed font failure when the shaped-font pipeline rejects. |
| onReady? | (editor: Editor) => void | Fired once per instance, after it is published to the tree (and after any `DocxEditor.Content` in the same commit has attached its mount point). A large document mounts behind one painted frame; `onReady` fires AFTER that mount lands, so scrolling or selecting from it works on any document size. |
| onRevisionMarkupChange? | (settings: ResolvedRevisionMarkup) => void | Receives proposed settings from API or dialog changes, excluding prop reconciliation. |
| popups? | DocxEditorPopups | Customize automatically mounted popups. Set an entry to false for manual ownership. |
| reviewDisplayMode? | ReviewDisplayMode | Initial revision display mode. |
| revisionMarkup? | RevisionMarkupOptions | Controlled viewer markup settings. Omitted fields use defaults. Save callback values into this prop to accept API and dialog changes. Omit this prop for uncontrolled settings. Use one configuration source. |
| tableInteractionLabel? | (key: TableInteractionLabelKey) => string | Localized labels for table insertion furniture. When omitted, core falls back to bundled English through [defaultTableLabel](defaultTableLabel). |
| translate? | (key: string, params?: Record<string, string | number>) => string | Live drawing and form-control labels; defaults to the active catalogue. |
| zoom? | number | A fixed scale. Supplying one also means the mode is fixed, unless `zoomMode` says otherwise: an app that pinned 100% keeps 100% on every window size. |
| zoomMode? | ZoomMode | 'auto' | Where the scale comes from. Defaults to `'auto'`: fit the page width, between 50% and 100%, so a window with room for the sheet renders at 100% and a narrower one shrinks rather than growing a horizontal scrollbar — down to the floor, past which it scrolls. |
DocxEditorRulerPropsinterfaceSource ↗
Props for the context-fed ruler parts.
interface DocxEditorRulerProps| Member | Type | Summary |
|---|---|---|
| className? | string | |
| style? | CSSProperties | |
| unit? | 'inch' | 'cm' | Measurement unit for tick labels. Defaults to inches. |
DocxEditorSplitCellDialogPropsinterfaceSource ↗
Props for DocxEditor.SplitCellDialog.
interface DocxEditorSplitCellDialogProps extends DialogCustomizationProps| Member | Type | Summary |
|---|---|---|
| onClose | () => void | Called on Cancel, Escape, overlay click, and after a successful Split. |
| open | boolean | Whether the dialog is shown. The host owns this state. |
DocxEditorTextFormFieldDialogPropsinterfaceSource ↗
Field Options session and presentation.
interface DocxEditorTextFormFieldDialogProps extends DialogCustomizationProps| Member | Type | Summary |
|---|---|---|
| session | TextFormFieldDialogSession | null |
DocxEditorToolbarGroupPropsinterfaceSource ↗
Props for DocxEditor.Toolbar.Group.
interface DocxEditorToolbarGroupProps| Member | Type | Summary |
|---|---|---|
| after? | ChromeGroupId | (string & {}) | The group this one follows in the bar. Without it, a host group follows every built-in group, in order of appearance. Ignored for built-in ids. |
| children? | DocxEditorChildren | |
| className? | string | |
| id | ChromeGroupId | (string & {}) | The group id. A built-in id (`'history'`, `'font'`, `'text'`, `'review'`, ...) adds the children to that group, after its own controls. Any other id makes a host group. |
| label? | string | Literal heading and accessible name for a host group. It wins over `labelKey`. Without either, the heading is `id`. Built-in groups keep their own label. |
| labelKey? | string | Catalog key for the host group's "⋯" panel heading and accessible name. It goes through the toolbar's `t` and the locale catalog. Built-in groups keep their own label. |
| overflowContent? | () => DocxEditorChildren | Content for the group's "⋯" panel section, rendered after a built-in group's own rows. It renders even when the group has no children, so a built-in id can add a panel-only row. Without it, the panel renders the children in panel rows: actions and buttons become labeled rows, and other content renders as is. |
| pinned? | boolean | `true` keeps the group in the bar at every width, like the review group. |
| priority? | number | Collapse priority. A lower number leaves the bar first. Built-in groups use 10 (zoom) through 90 (history) in steps of 10. A host group without a priority collapses before every built-in group. |
DocxEditorToolbarNamespaceinterfaceSource ↗
The toolbar with its parts attached as statics.
interface DocxEditorToolbarNamespace| Member | Type | Summary |
|---|---|---|
| (member-0) | | |
| Action | typeof ToolbarAction | A host-owned action the chrome registry does not describe. |
| AddComment | typeof ToolbarAddComment | Opens a comment draft on the selection in the review rail. |
| AlignCenter | ToolbarPartComponent | |
| AlignJustify | ToolbarPartComponent | |
| AlignLeft | ToolbarPartComponent | |
| Alignment | ToolbarAlignmentComponent | |
| AlignRight | ToolbarPartComponent | |
| Bold | ToolbarPartComponent | |
| BulletList | ToolbarPartComponent | |
| Button | typeof ToolbarButton$1 | |
| ClearFormatting | ToolbarPartComponent | |
| Comments | ToolbarPartComponent | |
| ContentControlFormFill | ToolbarPartComponent | |
| ContentControlInspector | ToolbarPartComponent | |
| ContentControlRemove | ToolbarPartComponent | |
| ContentControlShowAll | ToolbarPartComponent | |
| EditingMode | ToolbarSlotPartComponent | |
| FontColor | ToolbarColorSplitComponent | |
| FontFamily | typeof FontFamily | |
| FontSize | ToolbarSlotPartComponent | |
| Group | typeof ToolbarHostGroup | A group of the preset bar: host content that is measured and collapses into the "⋯" panel, or, with a built-in id, controls added to that group or the group hidden. |
| Highlight | ToolbarColorSplitComponent | |
| ImageAltText | ImageAltTextPartComponent | |
| ImageInsert | ToolbarPartComponent | |
| ImageProperties | ToolbarPartComponent | |
| ImageWrap | ImageWrapPartComponent | |
| Indent | ToolbarPartComponent | |
| Italic | ToolbarPartComponent | |
| LeftToRight | ToolbarPartComponent | |
| LineSpacing | ToolbarSlotPartComponent | |
| Link | ToolbarPartComponent | |
| NumberedList | ToolbarPartComponent | |
| Outdent | ToolbarPartComponent | |
| Redo | ToolbarPartComponent | |
| Reviewers | typeof ToolbarReviewers | |
| RightToLeft | ToolbarPartComponent | |
| Save | ToolbarSlotPartComponent | |
| Separator | typeof ToolbarSeparator | |
| Slot | typeof ToolbarSlot | Replaces one built-in slot with arbitrary content, in the slot's place. |
| Strike | ToolbarPartComponent | |
| StylePicker | typeof ParagraphStyle | |
| Subscript | ToolbarPartComponent | |
| Superscript | ToolbarPartComponent | |
| TableBorderColor | TableBorderColorNamespace | Border-colour split compound (quick-apply main + swatch dialog). |
| TableBorderStyle | TableBorderStyleNamespace | Border line-style menu compound. |
| TableBorderTarget | TableBorderTargetNamespace | Border-edge target picker compound for contextual table chrome. |
| TableBorderWidth | TableBorderWidthNamespace | Border width menu compound. |
| TableCellFill | TableCellFillNamespace | Cell background fill split compound (quick-apply main + swatch dialog). |
| TableInsert | ToolbarPartComponent | |
| TableMergeCells | ToolbarPartComponent | Merge the selected cells. |
| TableSplitCell | ToolbarPartComponent | Open the Split cells dialog. |
| Underline | ToolbarPartComponent | |
| Undo | ToolbarPartComponent | |
| Zoom | ToolbarSlotPartComponent |
DocxEditorToolbarPropsinterfaceSource ↗
Props for DocxEditor.Toolbar.
interface DocxEditorToolbarProps| Member | Type | Summary |
|---|---|---|
| children? | DocxEditorChildren | |
| className? | string | Appended after the base `docx-toolbar` class. |
| onSave? | () => void | Handler for the `file.save` control. Save is not an engine command (`Editor.save()` returns bytes the host must deliver), so without a handler the control renders disabled — same contract as the Vue toolbar's `onSave`. |
| overflow? | boolean | `false` lets the bar WRAP to more rows instead of moving controls into the "⋯" menu, one at a time, when it runs out of width. Default `true`. |
| preset? | boolean | `false` renders children verbatim with no default arrangement. Default `true`: part children override their slots in place, others append. |
| t? | ToolbarTranslate | i18n resolver for control labels; without it the raw keys show (never English). |
DocxEditorToolbarSlotPropsinterfaceSource ↗
Props for DocxEditor.Toolbar.Slot.
interface DocxEditorToolbarSlotProps| Member | Type | Summary |
|---|---|---|
| children? | DocxEditorChildren | |
| overflowContent? | () => DocxEditorChildren | Content for the slot's "⋯" panel row when the slot leaves the bar. Without it the panel row shows the children under the slot's label. |
| slotId | ChromeSlotId | The built-in slot this content replaces, for example `'text.bold'`. |
DocxEditorUnsupportedElementPropsinterfaceSource ↗
Props for a registered unsupported-content renderer.
interface DocxEditorUnsupportedElementProps extends UnsupportedElementRule| Member | Type | Summary |
|---|---|---|
| children | (props: {
element: UnsupportedElement;
}) => ReactNode | Render this occurrence. Empty content preserves the drawing or placeholder. Empty content includes `null`, `false`, empty fragments or arrays, and whitespace. Child components can return empty content while an image loads. The editor calls this function for each occurrence. Put hooks in a returned child component. Use `drawingPreviewDocx` from `@docx-editor.dev/core/editor` to create a preview DOCX. |
| includePartial? | UnsupportedElementRule['includePartial'] | Include partially rendered drawings (`support: 'partial'`). Defaults to `false`. Excludes fully supported drawings, hidden drawings, and drawings without a layout position. Excludes shapes with editable text. Partially rendered shapes without text remain eligible. |
DocxEditorViewportPropsinterfaceSource ↗
Props for DocxEditor.Viewport.
interface DocxEditorViewportProps| Member | Type | Summary |
|---|---|---|
| children? | DocxEditorChildren | |
| className? | string | Appended after the load-bearing viewport classes (e.g. `dark` for chrome theming). |
| style? | CSSProperties |
DocxEditorWatermarkDialogPropsinterfaceSource ↗
Props for DocxEditor.WatermarkDialog.
interface DocxEditorWatermarkDialogProps extends DialogCustomizationProps| Member | Type | Summary |
|---|---|---|
| onClose | () => void | Called on Cancel, Escape, overlay click, and after a successful Apply. |
| open | boolean | Whether the dialog is shown. The host owns this state. |
| presets? | readonly string[] | The text choices offered for a text watermark. Defaults to `DEFAULT_WATERMARK_PRESETS`. |
DocxEditorWindowPropsinterfaceSource ↗
Props for DocxEditor.Window.
interface DocxEditorWindowProps| Member | Type | Summary |
|---|---|---|
| children? | DocxEditorChildren | The editor panel: toolbar, viewport and content, or any part of them. |
| features? | string | The `window.open` features. Defaults to `popup,width=1000,height=900`. |
| name? | string | The window name. Defaults to `docx-editor`. Two `DocxEditor.Window` components with the same name share one browser window, so give each editor its own name. |
| onClose? | () => void | The pop-out went away: the user closed it, or the browser blocked it. Set `open` to `false` here. The panel is already back in place when this runs. |
| open | boolean | Render `children` in a pop-out window. While `false`, they render in place. |
| styles? | boolean | ((from: Document, to: Document) => () => void) | Copy this page's stylesheets into the window, and keep copying new ones. Default `true`. |
| title? | string | The pop-out's title. |
| url? | string | A same-origin page to open. Defaults to `about:blank`. |
EditorCaretinterfaceSource ↗
A caret position: a paragraph and a UTF-16 offset inside it — the shape the write APIs take as their at.
interface EditorCaret| Member | Type | Summary |
|---|---|---|
| offset | number | |
| paragraphId | string |
EditorCommandStateinterfaceSource ↗
The live state of one editor control, plus its action.
interface EditorCommandState| Member | Type | Summary |
|---|---|---|
| disabledReason | string | null | The engine's reason when disabled — surface it as a tooltip, never invent one. |
| execute | EditorCommandExecute | Run the command through the can-before-exec path. |
| isActive | boolean | Whether the command is currently applied at the selection (bold on bold text). |
| isEnabled | boolean | Whether the engine will honour the command right now. |
| value | string | null | What the control SHOWS, for the slots whose answer is a value rather than a pressed state — the editing-mode pill, and the format painter's `off` / `once` / `locked`. |
EditorValueCommandStateinterfaceSource ↗
Live state and typed execution for a value control.
interface EditorValueCommandState<T extends string | number>| Member | Type | Summary |
|---|---|---|
| disabledReason | string | null | |
| execute | (value: T, options?: EditorExecOptions) => ExecResult | |
| isEnabled | boolean | |
| options | readonly T[] | |
| value | T | null | Null for mixed or unavailable formatting. |
FontFamilyItemPropsinterfaceSource ↗
Props for FontFamily.Item.
interface FontFamilyItemProps extends FontFamilyPartProps| Member | Type | Summary |
|---|---|---|
| value | string | The family this item applies. |
FontFamilyNamespaceinterfaceSource ↗
The compound part with its sub-parts attached as statics.
interface FontFamilyNamespace| Member | Type | Summary |
|---|---|---|
| (member-0) | | |
| Content | typeof FontFamilyContent | |
| docxSlot | 'font.family' | |
| Item | typeof FontFamilyItem | |
| Trigger | typeof FontFamilyTrigger |
FontFamilyPartPropsinterfaceSource ↗
Props for DocxEditorToolbar.FontFamily and its sub-parts.
interface FontFamilyPartProps| Member | Type | Summary |
|---|---|---|
| asChild? | boolean | |
| children? | DocxEditorChildren | |
| className? | string |
FontFamilyPropsinterfaceSource ↗
Props for the compound root.
interface FontFamilyProps extends FontFamilyPartProps| Member | Type | Summary |
|---|
FontOptioninterfaceSource ↗
Shared FontOption shape + normaliser used by FontPicker components in both adapters. Lifted from packages/react/src/components/ui/ normalizeFontFamilies.ts so the type definition has a single home.
interface FontOption| Member | Type | Summary |
|---|---|---|
| category? | 'sans-serif' | 'serif' | 'monospace' | 'other' | |
| fontFamily | string | |
| name | string |
HorizontalRulerPropsinterfaceSource ↗
interface HorizontalRulerProps$1| Member | Type | Summary |
|---|---|---|
| className? | string | |
| editable? | boolean | Whether the MARGIN handles drag. |
| indent? | RulerIndent | null | The paragraph's indent in twips; `firstLine` is SIGNED, negative for a hanging. |
| indentEditable? | boolean | Whether the INDENT handles drag — a different capability from `editable`. |
| onIndentChange? | (indent: RulerIndent) => void | Fires continuously through an indent drag, for the host to preview. |
| onIndentDragEnd? | () => void | Fires when an indent drag is released — the moment to commit one undoable step. |
| onLeftMarginChange? | (marginTwips: number) => void | |
| onMarginDragEnd? | () => void | Fires when a margin drag is released — the moment to commit what the drag previewed. |
| onRightMarginChange? | (marginTwips: number) => void | |
| onTabMarkRemove? | (positionTwips: number) => void | |
| pageSetup? | RulerPageSetup | null | |
| showIndentHandles? | boolean | Paint the four indent handles. |
| style? | CSSProperties | |
| tabMarks? | RulerTabStop[] | null | |
| unit? | 'inch' | 'cm' | |
| zoom? | number |
HyperLinkActionPropsinterfaceSource ↗
Props for the action parts, which also take an icon.
interface HyperLinkActionProps extends HyperLinkPartProps| Member | Type | Summary |
|---|---|---|
| icon? | DocxEditorChildren | Icon override; falls back to `children`, then to the part's default glyph. |
HyperLinkPartPropsinterfaceSource ↗
Shared props for every part.
interface HyperLinkPartProps| Member | Type | Summary |
|---|---|---|
| asChild? | boolean | Merge this part's wiring onto the single child element instead of the default one. |
| children? | DocxEditorChildren | |
| className? | string |
HyperlinkPopupAnchorinterfaceSource ↗
Where the popover sits, in viewport coordinates.
interface HyperlinkPopupAnchor| Member | Type | Summary |
|---|---|---|
| left | number | |
| top | number |
HyperlinkPopupStateinterfaceSource ↗
The popover's observable state.
interface HyperlinkPopupState| Member | Type | Summary |
|---|---|---|
| anchor | HyperlinkPopupAnchor | null | Viewport position for the panel; null means "the host places it". |
| canEdit | boolean | Whether the document can be edited right now; read-only trims the actions. |
| copied | boolean | True after a copy, until the next state change — for a "Copied" confirmation. |
| error | boolean | True when the last Apply was refused, so the panel can say so instead of sitting there. |
| link | SurfaceHyperlink | null | The link being read or edited, or null while inserting a new one. |
| mode | HyperlinkPopupMode | |
| text | string | Draft display text, in edit mode. |
| url | string | Draft target, in edit mode. |
HyperLinkPropsinterfaceSource ↗
Props for DocxEditor.HyperLink.
interface HyperLinkProps extends HyperLinkPartProps| Member | Type | Summary |
|---|---|---|
| preset? | boolean | Render the packaged arrangement. `false` mounts only the popover shell and whatever parts you pass as children — the rung for "I want the wiring, not the layout". |
ImagePropertiesTriggerPropsinterfaceSource ↗
Props for the toolbar properties trigger.
interface ImagePropertiesTriggerProps| Member | Type | Summary |
|---|---|---|
| asChild? | boolean | |
| children? | DocxEditorChildren | |
| className? | string |
IndentUpdateinterfaceSource ↗
The fields apply accepts — twips throughout, like every other read shape here.
Omitted fields are left as authored; null CLEARS one, so the paragraph falls back to its style. That is a different thing from zero, which blocks the cascade — the same distinction setParagraphSpacing draws.
firstLine is ONE SIGNED offset from the left indent: negative IS the hanging indent. OOXML spells it as two mutually exclusive attributes, and a caller should not have to know which of them wins.
interface IndentUpdate| Member | Type | Summary |
|---|---|---|
| firstLine? | number | null | |
| left? | number | null | |
| right? | number | null |
ListStateinterfaceSource ↗
interface ListState| Member | Type | Summary |
|---|---|---|
| isInList | boolean | |
| level | number | |
| numId? | number | |
| type | ListType |
LocaleProviderPropsinterfaceSource ↗
interface LocaleProviderProps| Member | Type | Summary |
|---|---|---|
| children | DocxEditorChildren | |
| dir? | 'ltr' | 'rtl' | The writing direction of the editor chrome. Defaults to the catalog's `_dir`, then to a right-to-left `_lang`, then to the direction of an outer provider. With `'rtl'`, the toolbar, menu bar, dialogs, context menu, panes, and review column mirror without a wrapper element. `'ltr'` keeps a left-to-right chrome on a right-to-left host page. Without any of these, as with the shipped left-to-right catalogs, the chrome inherits the host page direction. |
| i18n? | Translations |
MenuActionPropsinterfaceSource ↗
Props for the pinned File rows.
interface MenuActionProps| Member | Type | Summary |
|---|---|---|
| className? | string |
MenuGroupPropsinterfaceSource ↗
Props for DocxEditor.Menu.Group: a titled section of rows.
interface MenuGroupProps| Member | Type | Summary |
|---|---|---|
| children? | DocxEditorChildren | |
| className? | string | |
| label? | string | Literal heading, already resolved. Wins over [labelKey](labelKey). |
| labelKey? | string | i18n key of the heading. |
MenuItemBasePropsinterfaceSource ↗
The props every Menu.Item takes besides the slot it names.
interface MenuItemBaseProps| Member | Type | Summary |
|---|---|---|
| className? | string | |
| labelKey? | string | Plain-label i18n key, overriding the slot's tooltip-shaped one. |
| shortcutKey? | string | i18n key of the shortcut shown in the right column. |
MenuItemPropsinterfaceSource ↗
Props for DocxEditor.Menu.Item: one chrome slot as a menu row. Set slotId. A row with neither slotId nor the deprecated slot renders nothing, with a development warning. An interface, so a host can extend it.
interface MenuItemProps extends MenuItemBaseProps| Member | Type | Summary |
|---|---|---|
| slot? | ChromeSlotId | |
| slotId? | ChromeSlotId | The chrome slot this row drives (`'text.bold'`, `'insert.pageBreak'`, …). |
MenuPartComponentinterfaceSource ↗
A menu pinned to one registry id, for DocxEditor.Menu.File and friends.
interface MenuPartComponent| Member | Type | Summary |
|---|---|---|
| (member-0) | | |
| docxMenu | ChromeMenuId |
MenuPropsinterfaceSource ↗
Props for DocxEditor.Menu.Menu and the five pinned menu parts.
interface MenuProps| Member | Type | Summary |
|---|---|---|
| children? | DocxEditorChildren | Panel content. |
| className? | string | |
| icon? | DocxEditorChildren | Icon shown before the trigger's label. |
| id | MenuId | Which menu this is. Only one panel in the bar is open at a time, keyed on this. |
| label? | string | Literal trigger label, already resolved. Wins over `labelKey`, and is what a host-defined menu uses — its name is not in our catalogue and never will be. |
| labelKey? | string | i18n key of the trigger label. Defaults to the registry's. |
| preset? | boolean | `false` renders `children` verbatim as the whole panel. Default `true`: the panel is the registry's rows for this menu, with a row child REPLACING the row it names in place (`hidden` removes it) and any other child appended. Use `false` when the order matters and you want to state it yourself. |
MenuReportIssuePropsinterfaceSource ↗
Props for DocxEditor.Menu.ReportIssue.
interface MenuReportIssueProps| Member | Type | Summary |
|---|---|---|
| className? | string | |
| onSelect? | () => void | Replaces the packaged handler. Falls back to the menu's `onReportIssue`, then to this project's own tracker. |
MenuRowPropsinterfaceSource ↗
Props for DocxEditor.Menu.Row: one presentational menu row.
interface MenuRowProps| Member | Type | Summary |
|---|---|---|
| "data-value"? | string | What the slot currently SHOWS, for a control whose state is more than pressed-or-not — the format painter's `once` against its `locked`. Declared rather than left to a spread: this component renders only the props it names, so an undeclared attribute is dropped in silence, and the stylesheet rule keyed on it can never match. |
| active? | boolean | Checked state, for a row that TOGGLES (bold on bold text). Leave undefined on a row that just acts: `menuitemcheckbox` with `aria-checked="false"` announces "not selected" on a Page break row, which is a claim about state it does not have. |
| children? | DocxEditorChildren | |
| className? | string | |
| disabled? | boolean | |
| icon? | DocxEditorChildren | Material Symbols paths, rendered as inline SVG in the row's icon column. |
| onSelect? | () => void | |
| rowSlot? | string | Vue TSX maps row identity through `rowSlot` because `slot` is reserved. React uses [slot](slot) directly. |
| selected? | true | Present on a row belonging to a MUTUALLY EXCLUSIVE set (the four alignments), which makes it `menuitemradio` rather than `menuitemcheckbox`. Four independent checkboxes is a different claim from one-of-four, and a screen reader reads it as such. |
| selectHandler? | () => void | Vue TSX binds row activation through `selectHandler` because `onSelect` is treated as a listener. React uses [onSelect](onSelect) directly. |
| shortcut? | string | Right-aligned shortcut text (already resolved). |
| slot? | string | Stable marker for hosts, tests and e2e. |
| title? | string | Tooltip. Set it for the ENGINE's disabled reason and nothing else — a menu row's text is already visible, so a tooltip repeating it is noise, and inventing a reason for a refusal the engine explained is the thing this codebase does not do. |
MenuSeparatorPropsinterfaceSource ↗
Props for DocxEditor.Menu.Separator.
interface MenuSeparatorProps| Member | Type | Summary |
|---|---|---|
| className? | string |
MenuSubmenuBasePropsinterfaceSource ↗
The props every Menu.Submenu takes besides its label.
interface MenuSubmenuBaseProps| Member | Type | Summary |
|---|---|---|
| children? | DocxEditorChildren | |
| className? | string | |
| paths? | readonly string[] | null | Material Symbols paths for the parent row's icon. |
MenuSubmenuPropsinterfaceSource ↗
Props for DocxEditor.Menu.Submenu. Set labelKey or label. A submenu with neither has no name, with a development warning. An interface, so a host can extend it.
interface MenuSubmenuProps extends MenuSubmenuBaseProps| Member | Type | Summary |
|---|---|---|
| label? | string | Literal parent row label, already resolved. Wins over `labelKey`. |
| labelKey? | string | i18n key of the parent row's label. |
MenuTableGridPropsinterfaceSource ↗
Props for DocxEditor.Menu.TableGrid.
interface MenuTableGridProps| Member | Type | Summary |
|---|---|---|
| className? | string | |
| slot? | ChromeSlotId | The slot the picked size dispatches through. Defaults to `table.insert`. |
NavigationPartPropsinterfaceSource ↗
Shared props for the pane's structural parts.
interface NavigationPartProps| Member | Type | Summary |
|---|---|---|
| children? | DocxEditorChildren | |
| className? | string | |
| style? | CSSProperties |
NavigationShiftInputinterfaceSource ↗
interface NavigationShiftInput| Member | Type | Summary |
|---|---|---|
| docked? | boolean | Whether the page's WIDTH follows the padding right now. |
| inlineEndReservation? | number | Padding already reserved at the inline end, for example by the review rail. |
| inlineStartReservation? | number | Padding already standing at the inline START besides the shift itself — the review gutter's mirrored strip. It moves the page exactly as the shift does, so a shift computed without it lands the page that far past the reservation. |
| pageWidthPx | number | Rendered width of one page, zoom applied. |
| reservation | number | Space the open pane needs, from [navigationPaneReservation](navigationPaneReservation). |
| viewportWidth | number | Client width of the scroll container. |
NavigationTabPropsinterfaceSource ↗
Props for one tab.
interface NavigationTabProps extends NavigationPartProps| Member | Type | Summary |
|---|---|---|
| value | NavigationTab$1 |
OutlineHeadingIteminterfaceSource ↗
A heading plus how deep to indent it in a rendered list.
interface OutlineHeadingItem| Member | Type | Summary |
|---|---|---|
| depth | number | Indent depth RELATIVE to the shallowest heading present, not the absolute level. A memo whose top sections are Heading 2 should left-align them at the base instead of carrying a phantom first-level indent. |
| heading | OutlineHeading$1 |
PageIndicatorPropsinterfaceSource ↗
interface PageIndicatorProps| Member | Type | Summary |
|---|---|---|
| currentPage | number | |
| totalPages | number | |
| visible | boolean |
PageSetupDialogFieldsinterfaceSource ↗
Draft page dimensions and margins use twips.
interface PageSetupDialogFields| Member | Type | Summary |
|---|---|---|
| marginBottom | number | |
| marginLeft | number | |
| marginRight | number | |
| marginTop | number | |
| orientation | 'portrait' | 'landscape' | |
| pageHeight | number | |
| pageWidth | number | |
| scope | 'document' | 'section' |
PageSetupUpdateinterfaceSource ↗
The fields apply accepts — twips throughout, like every read shape. Omitted fields are left as authored. scope is Word's "Apply to": 'document' (the default) writes every section, 'section' only the one the selection is in.
interface PageSetupUpdate| Member | Type | Summary |
|---|---|---|
| marginBottomTwips? | number | |
| marginLeftTwips? | number | |
| marginRightTwips? | number | |
| marginTopTwips? | number | |
| orientation? | 'portrait' | 'landscape' | |
| pageHeightTwips? | number | |
| pageWidthTwips? | number | |
| scope? | 'document' | 'section' |
PaginatedDocxEditorHandleinterfaceSource ↗
What a host can drive from outside.
Commands only. There is no accessor for the document or the layout, because a caller holding either could act on a revision the model has already left behind.
interface PaginatedDocxEditorHandle| Member | Type | Summary |
|---|---|---|
| focus | | |
| formatting | | Formatting at the selection, for a toolbar to reflect. |
| navigate | | |
| redo | | |
| save | | Save pending form input. Throws for invalid values or an active edit. |
| sectionProperties | | The section the document declares — what a ruler is made of. |
| selectAll | | |
| setParagraphProperty | | `options.mergeAttributes` keeps the attributes the call does not name, for the properties carrying several independent settings in one element — `w:spacing` holds the line rule AND the space before and after, so a line-spacing pick without it deleted the paragraph's spacing. `physicalAlignment` and `paragraphDirection` spell `w:jc` and `w:bidi` per paragraph direction. |
| setRunProperty | | |
| toggleRunProperty | | |
| type | | |
| undo | |
PaginatedDocxEditorPropsinterfaceSource ↗
interface PaginatedDocxEditorProps| Member | Type | Summary |
|---|---|---|
| className? | string | |
| documentFontFamily? | string | The face runs naming no font are painted in. |
| measurer? | TextMeasurer | Host-supplied font metrics; layout stays DOM-free without it. |
| onError? | (reason: string, detail?: string) => void | Called once if the document cannot be opened, with the engine's typed reason. |
| onStateChange? | (state: PaginatedSurfaceState) => void | Called on every committed revision and every selection change. |
| ref? | Ref<PaginatedDocxEditorHandle> | |
| scale? | number | Points to CSS pixels. |
| source | Uint8Array | The document to open. Replacing it remounts the surface. |
PaginatedDocxEditorShellPropsinterfaceSource ↗
interface PaginatedDocxEditorShellProps| Member | Type | Summary |
|---|---|---|
| className? | string | |
| colorMode? | 'light' | 'dark' | Applies the editor's own dark palette; the document canvas stays Word-faithful. |
| documentFontFamily? | string | The face the document is painted in; never applied to the chrome. |
| documentName? | string | Shown in the title bar. |
| measurer? | TextMeasurer | |
| onError? | (reason: string, detail?: string) => void | |
| onSave? | (bytes: Uint8Array) => void | Called with the serialized document when File ▸ Save is used. |
| onStateChange? | (state: PaginatedSurfaceState) => void | |
| onZoomChange? | (zoom: number) => void | Reported when the zoom control changes, so the host can re-scale the surface. |
| ref? | Ref<PaginatedDocxEditorHandle> | Commands, forwarded from the editor the shell hosts. |
| renderTitleBarLeft? | () => DocxEditorChildren | Title-bar slots, owned by the HOST. |
| renderTitleBarRight? | () => DocxEditorChildren | |
| scale? | number | |
| source | Uint8Array |
ParagraphStyleItemPropsinterfaceSource ↗
Props for ParagraphStyle.Item.
interface ParagraphStyleItemProps extends ParagraphStylePartProps| Member | Type | Summary |
|---|---|---|
| value | string | The styleId this item applies. |
ParagraphStyleNamespaceinterfaceSource ↗
The compound part with its sub-parts attached as statics.
interface ParagraphStyleNamespace| Member | Type | Summary |
|---|---|---|
| (member-0) | | |
| Content | typeof ParagraphStyleContent | |
| docxSlot | 'styles.style' | |
| Item | typeof ParagraphStyleItem | |
| Trigger | typeof ParagraphStyleTrigger |
ParagraphStyleOptioninterfaceSource ↗
One pickable paragraph style, as the document defines it.
interface ParagraphStyleOption| Member | Type | Summary |
|---|---|---|
| name | string | |
| preview | {
readonly fontFamily: string | null;
readonly fontSizePt: number | null;
readonly bold: boolean;
readonly italic: boolean;
readonly color: string | null;
} | How the style looks, for rendering the row in its own face. Every value arrives already bounded by the engine's derivation (family against the CSS-sink shape, colour against six hex digits), which is what makes it safe to put in a style object. |
| styleId | string |
ParagraphStylePartPropsinterfaceSource ↗
Props for DocxEditorToolbar.StylePicker and its sub-parts.
interface ParagraphStylePartProps| Member | Type | Summary |
|---|---|---|
| asChild? | boolean | |
| children? | DocxEditorChildren | |
| className? | string |
ParagraphStylePropsinterfaceSource ↗
Props for the compound root.
interface ParagraphStyleProps extends ParagraphStylePartProps| Member | Type | Summary |
|---|
ProvideDocxEditorResultinterfaceSource ↗
Vue-only setup result; exported for cross-adapter API parity.
interface ProvideDocxEditorResult| Member | Type | Summary |
|---|---|---|
| DocxEditorRoot | typeof DocxEditorRoot | |
| editorRef | ReturnType<typeof useDocxEditor> | |
| rootListeners | DocxEditorRootListeners | |
| rootProps | Omit<DocxEditorRootProps, keyof DocxEditorRootListeners> |
ReviewGutterinterfaceSource ↗
What the scroll container reserves on each edge, in px.
interface ReviewGutter| Member | Type | Summary |
|---|---|---|
| inlineEnd | number | |
| inlineStart | number |
ReviewGutterInputinterfaceSource ↗
interface ReviewGutterInput| Member | Type | Summary |
|---|---|---|
| docked? | boolean | An uncapped fit is in force: the page fills whatever box it is given, so there is no entitlement to measure the leftover against. The full column stands. |
| inlineStartReservation? | number | Start-edge room OTHER chrome is asking for — an open navigation pane's reservation. Without it the column judged only page-against-viewport, stood in the two-pane case, and the pane's displacement then squeezed the fit below the page's entitlement — the very symptom the measurement exists to remove. The STATIC ask (open pane × width), never the pane's computed shift: the shift depends on this gutter, and reading it back would close a cycle the two reservations then chase around. |
| open | boolean | Whether the pane is showing its cards (`snapshot.reviewPaneOpen`). |
| pageWidthPx | number | The width the page is entitled to paint at — authored width times the entitled zoom. |
| scroll? | boolean | `overflow: 'scroll'`: the full column stands even when it does not fit. The page keeps the one size it has with the pane closed, and the viewport scrolls sideways to reach the cards. |
| viewportWidth | number | Client width of the scroll container. |
ReviewRailRegistryinterfaceSource ↗
Whether a review rail is mounted under this Root, and how much room it wants.
The GUTTER is the reason this exists. DocxEditor.Viewport reserves space beside the page for the pane, and the ruler shifts by the same amount — but neither of them can see whether a rail was actually composed in. Keyed on the pane's open state alone, every consumer of the tier-2 <DocxEditor> sugar (which mounts no rail) had its page pushed 158px off centre beside an empty column.
A rail registers on mount and unregisters on unmount, so the reservation follows what is really on screen. Count rather than boolean: StrictMode mounts twice, and a host may legitimately compose two rails.
interface ReviewRailRegistry| Member | Type | Summary |
|---|---|---|
| gutters? | number | Claims registered through `reserveGutter`: columns that need the review gutter but serve no comment draft. The viewport reserves the gutter while `mounted + gutters` is above zero. |
| mounted | number | Review columns registered through `register`: the packaged rail, and any column that serves comment drafts. The Add comment controls in the toolbar and the context menu appear only while this is above zero. |
| register | () => () => void | Register a review column that serves comment drafts. Also reserves the review gutter. Call it on mount, together with `registerCommentDraft`. Returns the unregister function. |
| registerCommentDraft | (handler: () => void) => () => void | Receive the Add comment requests. The handler takes no arguments: it reads the selection's position with `getSelectionPlacement`, pins the selection with `retainSelection`, and opens the pane. Release the pin with `releaseSelection` when the draft closes or is cancelled. The most recently registered handler receives each request. Do not register while the column cannot open a draft, such as in viewing mode: a request counts as served once a handler runs. While a handler is registered, the `review.addComment` control is enabled. Returns the unregister function. |
| requestCommentDraft | () => boolean | Send an Add comment request through the `review.addComment` control. The most recent registration receives it: a handler registered here, or one registered with `useCommentDraftRequest`. Returns `true` when a handler ran, even if it then opened nothing, and `false` when the control is disabled. |
| reserveGutter? | () => () => void | Reserve the review gutter without showing comment controls. Returns the release. |
ScopedChromeAnchorinterfaceSource ↗
interface ScopedChromeAnchor| Member | Type | Summary |
|---|---|---|
| ref | DocxEditorRefCallback<HTMLDivElement> | |
| style | CSSProperties |
SelectionFormattinginterfaceSource ↗
Current formatting state of the selection
interface SelectionFormatting| Member | Type | Summary |
|---|---|---|
| alignment? | ParagraphAlignment | Paragraph alignment |
| bidi? | boolean | Whether the paragraph is RTL (bidi) |
| bold? | boolean | Whether selected text is bold |
| color? | string | Text color |
| fontFamily? | string | Font family of selected text |
| fontSize? | number | Font size of selected text (in half-points) |
| highlight? | string | Highlight color |
| indentLeft? | number | Paragraph left indentation in twips |
| italic? | boolean | Whether selected text is italic |
| lineSpacing? | number | Line spacing in twips (OOXML value, 240 = single spacing) |
| listState? | ListState | List state of the current paragraph |
| strike? | boolean | Whether selected text has strikethrough |
| styleId? | string | Paragraph style ID |
| subscript? | boolean | Whether selected text is subscript |
| superscript? | boolean | Whether selected text is superscript |
| underline? | boolean | Whether selected text is underlined |
SlotPropsinterfaceSource ↗
interface SlotProps extends HTMLAttributes<HTMLElement>| Member | Type | Summary |
|---|---|---|
| children? | DocxEditorChildren | |
| className? | string | |
| ref? | Ref<unknown> | Fanned out alongside the child's own ref. |
| style? | CSSProperties |
SplitCellDialogFieldsinterfaceSource ↗
The Split cells dialog's draft, as typed.
interface SplitCellDialogFields| Member | Type | Summary |
|---|---|---|
| columns | string | The number of columns, as typed. |
| rows | string | The number of rows, as typed. |
TableBorderColorNamespaceinterfaceSource ↗
Border-colour split compound with a quick-apply main button and swatch dialog (DocxEditor.Toolbar.TableBorderColor).
interface TableBorderColorNamespace extends TableChromePartComponent| Member | Type | Summary |
|---|---|---|
| Content | (props: TableChromePartProps) => DocxEditorChildren | Open swatch dialog for the active border target. |
| docxSlot | 'table.borderColor' | Chrome slot id: `table.borderColor`. |
| Item | (props: TableChromeItemProps) => DocxEditorChildren | One colour swatch inside the border-colour dialog. |
| Main | (props: TableChromePartProps) => DocxEditorChildren | Applies the last swatch without opening the dialog. |
| Trigger | (props: TableChromePartProps) => DocxEditorChildren | Button that opens the border-colour swatch dialog. |
TableBorderStyleNamespaceinterfaceSource ↗
Border-style menu compound (DocxEditor.Toolbar.TableBorderStyle).
interface TableBorderStyleNamespace extends TableChromePartComponent| Member | Type | Summary |
|---|---|---|
| Content | (props: TableChromePartProps) => DocxEditorChildren | Open menu listing line styles for the active target. |
| docxSlot | 'table.borderStyle' | Chrome slot id: `table.borderStyle`. |
| Item | (props: TableChromeItemProps) => DocxEditorChildren | One line-style row inside the style menu. |
| Trigger | (props: TableChromePartProps) => DocxEditorChildren | Button that opens the border line-style menu. |
TableBorderTargetNamespaceinterfaceSource ↗
Border-target picker compound (DocxEditor.Toolbar.TableBorderTarget).
interface TableBorderTargetNamespace extends TableChromePartComponent| Member | Type | Summary |
|---|---|---|
| Content | (props: TableChromePartProps) => DocxEditorChildren | Open menu listing edge scopes and clear. |
| docxSlot | 'table.borderTarget' | Chrome slot id: `table.borderTarget`. |
| Item | (props: TableChromeItemProps) => DocxEditorChildren | One edge scope or clear row inside the target menu. |
| Trigger | (props: TableChromePartProps) => DocxEditorChildren | Button that opens the border-edge target menu. |
TableBorderWidthNamespaceinterfaceSource ↗
Border-width menu compound (DocxEditor.Toolbar.TableBorderWidth).
interface TableBorderWidthNamespace extends TableChromePartComponent| Member | Type | Summary |
|---|---|---|
| Content | (props: TableChromePartProps) => DocxEditorChildren | Open menu listing width presets for the active target. |
| docxSlot | 'table.borderWidth' | Chrome slot id: `table.borderWidth`. |
| Item | (props: TableChromeItemProps) => DocxEditorChildren | One width preset row inside the width menu. |
| Trigger | (props: TableChromePartProps) => DocxEditorChildren | Button that opens the border width menu. |
TableCellFillNamespaceinterfaceSource ↗
Cell-fill split compound (DocxEditor.Toolbar.TableCellFill).
interface TableCellFillNamespace extends TableChromePartComponent| Member | Type | Summary |
|---|---|---|
| Content | (props: TableChromePartProps) => DocxEditorChildren | Open swatch dialog for the selected cell(s). |
| docxSlot | 'table.cellFill' | Chrome slot id: `table.cellFill`. |
| Item | (props: TableChromeItemProps) => DocxEditorChildren | One fill swatch inside the cell-fill dialog. |
| Main | (props: TableChromePartProps) => DocxEditorChildren | Applies the last swatch without opening the dialog. |
| Trigger | (props: TableChromePartProps) => DocxEditorChildren | Button that opens the cell-fill swatch dialog. |
TableChromeItemPropsinterfaceSource ↗
Props for a value-driven row or swatch inside a table compound menu.
interface TableChromeItemProps extends TableChromePartProps| Member | Type | Summary |
|---|---|---|
| value | string | The pick value this item dispatches (target id, style name, width size, or hex without `#`). |
TableChromePartComponentinterfaceSource ↗
Shared compound contract for menu-style table chrome parts ([TableBorderTargetNamespace](TableBorderTargetNamespace), [TableBorderStyleNamespace](TableBorderStyleNamespace), [TableBorderWidthNamespace](TableBorderWidthNamespace)).
interface TableChromePartComponent extends ToolbarSlotPartComponent| Member | Type | Summary |
|---|---|---|
| Content | (props: TableChromePartProps) => DocxEditorChildren | The open menu or dialog panel; omit to use the default item list. |
| docxSlot | TableChromeSlotId | The chrome slot this compound drives. |
| Item | (props: TableChromeItemProps) => DocxEditorChildren | One selectable value row or swatch inside [Content](Content). |
| Trigger | (props: TableChromePartProps) => DocxEditorChildren | Opens the picker menu or dialog. |
TableChromePartPropsinterfaceSource ↗
Props shared by contextual table toolbar compound parts.
interface TableChromePartProps| Member | Type | Summary |
|---|---|---|
| asChild? | boolean | Merge props onto the single child element instead of rendering a default host node. |
| children? | DocxEditorChildren | Custom panel body or trigger label; defaults to the packaged control chrome. |
| className? | string | Appended to the part root class list. |
TextFormFieldDialogFieldsinterfaceSource ↗
Draft values for legacy text Field Options.
interface TextFormFieldDialogFields| Member | Type | Summary |
|---|---|---|
| defaultText | string | |
| enabled | boolean | |
| format | string | |
| maxLength | number | |
| type | string |
ToolbarActionPropsinterfaceSource ↗
Props for DocxEditorToolbar.Action.
interface ToolbarActionProps| Member | Type | Summary |
|---|---|---|
| active? | boolean | Pressed state, for an action that toggles. Sets `aria-pressed` and `data-active`. |
| asChild? | boolean | Merge the behavior onto the single child element instead of rendering a `<button>`. |
| children? | DocxEditorChildren | |
| className? | string | |
| disabled? | boolean | |
| disabledReason? | string | Tooltip when disabled — say why, the way the engine's controls do. |
| icon? | DocxEditorChildren | Icon content. Inline SVG sized ~18px matches the packaged controls. |
| label | string | Accessible name and tooltip. A resolved STRING, not an i18n key: the label belongs to the host's own action, so the host's own catalogue resolves it. (Registry controls go the other way — they carry keys and the toolbar's `t` resolves them.) |
| onSelect? | () => void |
ToolbarAlignmentComponentinterfaceSource ↗
The merged part is keyed by its GROUP id — it stands in for all four slots.
interface ToolbarAlignmentComponent| Member | Type | Summary |
|---|---|---|
| (member-0) | | |
| docxSlot | 'alignment' |
ToolbarButtonPropsinterfaceSource ↗
Props for DocxEditorToolbar.Button.
interface ToolbarButtonProps$1| Member | Type | Summary |
|---|---|---|
| asChild? | boolean | Merge the button's behavior into the single child element instead of a <button>. |
| children? | DocxEditorChildren | |
| className? | string | |
| icon? | DocxEditorChildren | Icon override; falls back to `children`, then to the registry's icon paths. |
| slot? | ChromeSlotId | |
| slotId? | ChromeSlotId | The chrome slot this button drives (`'text.bold'`, `'history.undo'`, ...). A button with neither `slotId` nor the deprecated `slot` renders nothing, with a development warning. |
ToolbarContextValueinterfaceSource ↗
interface ToolbarContextValue| Member | Type | Summary |
|---|---|---|
| onSave | (() => void) | undefined | Host save handler for the `file.save` part; absent renders the part disabled. |
| t | ToolbarTranslate | undefined |
ToolbarPartComponentinterfaceSource ↗
interface ToolbarPartComponent| Member | Type | Summary |
|---|---|---|
| (member-0) | | |
| docxSlot | ChromeSlotId |
ToolbarPropsinterfaceSource ↗
Deprecated. Use `DocxEditor.Toolbar` from the composition layer instead.
Props for the Toolbar (formatting rail) component
interface ToolbarProps| Member | Type | Summary |
|---|---|---|
| canRedo? | boolean | Whether redo is available |
| canUndo? | boolean | Whether undo is available |
| children? | DocxEditorChildren | Custom toolbar items to render at the end |
| className? | string | Additional CSS class name |
| currentFormatting? | SelectionFormatting | Current formatting of the selection |
| disabled? | boolean | Whether the toolbar is disabled |
| documentFonts? | readonly FontOption[] | Fonts the loaded document references that the browser can render (embedded faces + system-resolved). Rendered in a "Document fonts" group, deduped against `fontFamilies`. Managed by the editor, not a consumer prop. |
| documentStyles? | readonly DocumentStyleSummary[] | Document styles for the style picker (`Editor.getDocumentStyles()`). |
| editorRef? | RefObject<HTMLElement> | Ref to the editor container for keyboard events |
| enableShortcuts? | boolean | Whether to enable keyboard shortcuts (default: true) |
| fontFamilies? | ReadonlyArray<string | FontOption> | Custom list of fonts in the toolbar dropdown. When omitted, the built-in 12-font default is used. Strings render in the "Other" group; pass `FontOption[]` for category grouping and CSS fallback chains. An empty array renders an empty (but enabled) dropdown. |
| imageContext? | {
wrapType: string;
displayMode: string;
cssFloat: string | null;
} | null | Image context when an image is selected |
| inline? | boolean | When true, renders with display:contents so children flow in the parent flex container |
| onFormat? | (action: FormattingAction) => void | Callback when a formatting action is triggered |
| onImageTransform? | (action: 'rotateCW' | 'rotateCCW' | 'flipH' | 'flipV') => void | Callback for image transform (rotate/flip) |
| onImageWrapType? | (wrapType: string) => void | Callback when image wrap type changes |
| onInsertImage? | () => void | Callback when user wants to insert an image |
| onInsertPageBreak? | () => void | Callback when user wants to insert a page break |
| onInsertSectionBreakContinuous? | () => void | Callback when user wants to insert a "continuous" section break |
| onInsertSectionBreakNextPage? | () => void | Callback when user wants to insert a "next page" section break |
| onInsertShape? | (data: {
shapeType: string;
width: number;
height: number;
fillColor?: string;
fillType?: string;
outlineWidth?: number;
outlineColor?: string;
}) => void | Callback when user wants to insert a shape |
| onInsertTable? | (rows: number, columns: number) => void | Callback when a table should be inserted |
| onInsertTOC? | () => void | Callback when user wants to insert a table of contents |
| onOpen? | () => void | Callback to open/import a DOCX file (File → Open) |
| onOpenImageProperties? | () => void | Callback to open image properties dialog (alt text + border) |
| onPageSetup? | () => void | Callback to open page setup dialog |
| onPrint? | () => void | Callback for print action. Set to enable the File Print menu entry. |
| onRedo? | () => void | Callback for redo action |
| onRefocusEditor? | () => void | Callback to refocus the editor after toolbar interactions |
| onSave? | () => void | Callback to save/download the current DOCX (File → Save) |
| onTableAction? | (action: TableAction) => void | Callback when a table action is triggered |
| onUndo? | () => void | Callback for undo action |
| onWatermark? | () => void | Callback to open the watermark dialog |
| onZoomChange? | (zoom: number) => void | Callback when zoom changes |
| showAlignmentButtons? | boolean | Whether to show alignment buttons (default: true) |
| showFontPicker? | boolean | Whether to show font family picker (default: true) |
| showFontSizePicker? | boolean | Whether to show font size picker (default: true) |
| showHelpMenu? | boolean | Whether to show the Help menu in the menu bar (default: true) |
| showHighlightColorPicker? | boolean | Whether to show highlight color picker (default: true) |
| showLineSpacingPicker? | boolean | Whether to show line spacing picker (default: true) |
| showListButtons? | boolean | Whether to show list buttons (default: true) |
| showStylePicker? | boolean | Whether to show style picker (default: true) |
| showTableInsert? | boolean | Whether to show table insert button (default: true) |
| showTextColorPicker? | boolean | Whether to show text color picker (default: true) |
| showZoomControl? | boolean | Whether to show zoom control (default: true) |
| style? | CSSProperties | Additional inline styles |
| tableContext? | {
isInTable: boolean;
rowCount?: number;
columnCount?: number;
canSplitCell?: boolean;
hasMultiCellSelection?: boolean;
cellBorderColor?: ColorValue;
cellBackgroundColor?: string;
} | null | Table context when cursor is in a table |
| theme? | Theme | null | Theme for the style picker / color picker theme matrix |
| zoom? | number | Current zoom level (1.0 = 100%) |
ToolbarSeparatorPropsinterfaceSource ↗
Props for DocxEditorToolbar.Separator.
interface ToolbarSeparatorProps| Member | Type | Summary |
|---|---|---|
| className? | string |
ToolbarSlotPartComponentinterfaceSource ↗
A non-button part pinned to one slot.
interface ToolbarSlotPartComponent| Member | Type | Summary |
|---|---|---|
| (member-0) | | |
| docxSlot | ChromeSlotId |
ToolbarSlotPartPropsinterfaceSource ↗
Props for the non-button parts (pickers, steppers, color splits, save).
interface ToolbarSlotPartProps| Member | Type | Summary |
|---|---|---|
| className? | string |
UseBookmarkDialogReturninterfaceSource ↗
Bookmark dialog draft and actions. apply is Add.
interface UseBookmarkDialogReturn extends UseDialogReturn<BookmarkDialogFields>| Member | Type | Summary |
|---|---|---|
| canDelete | boolean | Whether Delete and Go To can act on the typed name. |
| canGoTo | boolean | |
| duplicates | number | How many other places carry the typed bookmark's name, which collaborators adding one name offline can leave. 0 for a name with one bookmark, or no bookmark. |
| goTo | | |
| keepFirst | | Keep the first bookmark with the typed name and remove its copies. |
| remove | | |
| rows | readonly BookmarkSummary[] | The bookmarks the list shows, in the chosen order. |
UseBookmarksReturninterfaceSource ↗
What useBookmarks returns.
interface UseBookmarksReturn| Member | Type | Summary |
|---|---|---|
| bookmarks | readonly BookmarkSummary[] | Every bookmark, hidden ones included, in document order. Reference-stable while unchanged. |
| goTo | (name: string) => ExecResult | Select the bookmark and scroll to it. |
| insert | (name: string) => ExecResult | Bookmark the selection under `name`. A bookmark with the name moves. |
| isWritable | boolean | Whether the document accepts bookmark edits now. Go To works either way. |
| keepFirst | (name: string) => ExecResult | Keep the first bookmark with this name and remove its copies, which collaborators adding one name offline can leave. The selection does not move. |
| remove | (name: string) => ExecResult | Delete the bookmark with this name. The text stays. |
UseCompareDocumentsDialogReturninterfaceSource ↗
Compare documents draft and actions.
interface UseCompareDocumentsDialogReturn extends UseDialogReturn<CompareDocumentsDialogValues>| Member | Type | Summary |
|---|---|---|
| busy | boolean | True while the chosen file is read and compared. `apply()` does nothing while it is true, so a second press cannot start a second compare. |
| cancelable | boolean | Whether `cancel()` stops a running compare. True when the editor compares in the background. |
| notice | string | undefined | A message that is not an error, such as that the documents have no differences. |
| originalHasTrackedChanges | boolean | Whether the open document has tracked changes, which the compare treats as accepted. |
| progress | CompareDocumentsProgress | null | How far the running compare is, when the editor compares in the background (see `reviewModule({ compareWorker })`). Null when no compare runs or none reports its steps. |
UseContentControlResultinterfaceSource ↗
What useContentControl answers.
interface UseContentControlResult| Member | Type | Summary |
|---|---|---|
| canRemove | boolean | Document is editable, a control is at the caret, and removal is not locked. |
| canSetValue | boolean | Document is editable and a control at the caret allows value edits. |
| closeInspector | () => void | |
| control | ContentControlInspectorState | null | The control at the caret, or null when the caret is outside every control. |
| controls | readonly ContentControlSummary[] | Every control in reading order. |
| formFill | boolean | Whether form-fill Tab navigation is on. |
| inspectorOpen | boolean | Whether the inspector panel is open. |
| openInspector | () => void | |
| remove | () => ExecResult | Unwrap the control at the caret, keeping content. |
| removeDisabledReason | string | null | Engine reason when remove would be refused, else null. |
| setFormFill | (on: boolean) => void | |
| setShowAll | (show: boolean) => void | |
| setValue | (value: string) => ExecResult | Set the control's value (string mapped by type inside the engine). |
| setValueDisabledReason | string | null | Engine reason when set-value would be refused, else null. |
| showAll | boolean | Whether show-all boundary chrome is on. |
| toggleFormFill | () => void | |
| toggleInspector | () => void | |
| toggleShowAll | () => void |
UseContentControlWidgetResultinterfaceSource ↗
The draft state a content-control value pop-up renders over.
Read it from useContentControlWidget() inside DocxEditorContentControlWidget, or from a fully custom popups.contentControlWidget renderer that mounts the provider through the packaged root. value is the draft; apply() commits it through the session, which the engine validates. The calendar members drive the date picker: calendar is the month in view, built for the session's locale.
interface UseContentControlWidgetResult| Member | Type | Summary |
|---|---|---|
| accept | string | Picture sessions: the image types `replaceImage` takes, as a file input `accept` list. |
| apply | | Commit `value`, or an explicit one; false when the engine refused it. |
| applyDateText | | |
| calendar | CalendarMonth | |
| cancel | | |
| dateText | string | Numeric regional date entry, separate from the ISO value. |
| focusDay | | Move keyboard focus to a day, turning the month if it lies outside the view. |
| focusIso | string | null | The day keyboard focus should land on after the grid renders, if any. |
| isEnabled | boolean | The engine still accepts a write for this control. |
| items | readonly ContentControlWidgetEntry[] | |
| kind | ContentControlWidgetSession['kind'] | |
| listId | string | ID shared by the combo input and listbox. |
| listNavigation | ContentControlListNavigation | Shared typeahead and roving-focus behavior for replacement lists. |
| nextMonth | | |
| previousMonth | | |
| refused | boolean | The last `apply()` was refused by the engine. |
| replaceImage | | Picture sessions: replace the control's image from a file or its bytes. The engine checks the format and size; false (and `refused`) when it declines or the session is not a picture session. |
| selectDay | | Commit one calendar day (`YYYY-MM-DD`). |
| selectToday | | Commit the current local date. |
| session | ContentControlWidgetSession | |
| setDateText | | |
| setValue | | |
| showMonth | | Jump to a month without committing. Month is zero-based; year is 100–9999. |
| value | string |
UseDialogReturninterfaceSource ↗
State shared by a dialog's controls.
interface UseDialogReturn<Fields extends object>| Member | Type | Summary |
|---|---|---|
| apply | | |
| cancel | | |
| errors | Readonly<Partial<Record<keyof Fields | 'form', string>>> | |
| isEnabled | boolean | |
| setValue | | |
| values | Fields |
UseDocumentOutlineResultinterfaceSource ↗
What useDocumentOutline answers.
interface UseDocumentOutlineResult| Member | Type | Summary |
|---|---|---|
| goTo | (blockId: string) => void | Move the caret to a heading and bring it into view. Unknown ids are a safe no-op. |
| headings | readonly OutlineHeading$1[] | The document's headings, in document order. Empty when it has none. |
| isEmpty | boolean | |
| items | readonly OutlineHeadingItem[] | The same headings with their rendering depth resolved. |
| selectedBlockId | string | null | The heading this pane last navigated to, so a list can show it as current. Tracks the PANE's navigation, not the caret: following the caret would mean walking the document on every selection change, and the engine has no derivation for it yet. |
UseDocumentSearchOptionsinterfaceSource ↗
How useDocumentSearch behaves.
interface UseDocumentSearchOptions| Member | Type | Summary |
|---|---|---|
| highlight? | DocumentSearchHighlight | Which matches to mark: every match with the active one emphasized (`'all'`), only the active match (`'active'`), or none (`'none'`). Default: `'all'`. |
UseDocumentSearchResultinterfaceSource ↗
What useDocumentSearch answers.
interface UseDocumentSearchResult| Member | Type | Summary |
|---|---|---|
| activeIndex | number | Index of the match the caret was last sent to, or `-1` before any navigation. |
| activeMatch | TextMatch | null | The current match, or `null` before any navigation. |
| clear | () => void | Empty the box and drop the results, without touching the selection. |
| find | (query: string, options?: DocumentSearchFindOptions) => readonly TextMatch[] | Search now and return the matches. `selectFirst` selects the first match; `highlight` highlights the results until `clear()`, even without this hook's own request. |
| goTo | (index: number) => boolean | Select a match by index and bring its page into view. Focus stays where it is, so a search box keeps it. Returns false for an index without a match. |
| isPending | boolean | Whether a typed query is waiting for its debounce to elapse. |
| matchCase | boolean | |
| matches | readonly TextMatch[] | Matches for the last RUN query, in document order. |
| next | () => boolean | Next / previous match, wrapping at the ends the way Word's arrows do. |
| previous | () => boolean | |
| query | string | The text in the search box, updated synchronously as the user types. |
| setMatchCase | (value: boolean) => void | |
| setQuery | (query: string) => void | Update the typed query. The search runs after a short debounce. |
| setWholeWord | (value: boolean) => void | |
| truncated | boolean | Whether the engine stopped at its cap with matches still ahead of it, so a count should read "2000+" rather than an exact total. A search that lands on exactly the cap reports true; over-reporting by one is the honest direction. |
| wholeWord | boolean |
UseDocxSourceOptionsinterfaceSource ↗
Options for [useDocxSource](useDocxSource).
interface UseDocxSourceOptions| Member | Type | Summary |
|---|---|---|
| fetchOptions? | RequestInit | Passed to `fetch` for a URL source — credentials, headers, an AbortSignal's siblings. |
| fonts? | DocxFontsSource |
UseDocxSourceResultinterfaceSource ↗
What [useDocxSource](useDocxSource) reports.
interface UseDocxSourceResult| Member | Type | Summary |
|---|---|---|
| document | Uint8Array | undefined | Bytes for `DocxEditor`'s `document` prop; undefined until they arrive. |
| error | Error | null | Why the DOCUMENT could not be opened. Font failures never land here — see below. |
| fonts | FontConfiguration | FontResolver | undefined | What to hand the `fonts` prop; undefined until there is something to hand it. |
| isLoading | boolean | True until the document either arrives or fails. |
UseEditorColorModeReturninterfaceSource ↗
What [useEditorColorMode](useEditorColorMode) returns.
interface UseEditorColorModeReturn| Member | Type | Summary |
|---|---|---|
| colorMode | ResolvedColorMode | The resolved theme: `'dark'` or `'light'`. Re-renders when `colorMode` or the OS setting changes. |
UseFontFamilyResultinterfaceSource ↗
What useFontFamily answers.
interface UseFontFamilyResult| Member | Type | Summary |
|---|---|---|
| isEnabled | boolean | Whether the engine would honour a font change right now. |
| options | readonly string[] | The offerable font catalog (validated, deduplicated, sorted): the editor's standard and configured families merged with the document's declared ones. |
| setValue | (family: string) => void | Apply a family through the can-before-exec path; a refusal is a safe no-op. |
| value | string | null | The selection's agreed family, or null (mixed selection, or no document). |
UseGoToBookmarkOptionsinterfaceSource ↗
How useGoToBookmark is configured.
interface UseGoToBookmarkOptions| Member | Type | Summary |
|---|---|---|
| enabled? | boolean | Whether to read the document's bookmarks. Defaults to `true`. Pass `false` while your UI is hidden: the list is then empty and the document is not read on each change. |
UseGoToBookmarkReturninterfaceSource ↗
What useGoToBookmark answers.
interface UseGoToBookmarkReturn| Member | Type | Summary |
|---|---|---|
| activeIndex | number | Index into `rows` of the highlighted row, or -1 when none is. The highlight follows its bookmark when rows move, and clears when that bookmark goes away. |
| bookmarks | readonly BookmarkSummary[] | Every bookmark the document declares, hidden ones included. Empty while disabled. |
| go | (name?: string) => ExecResult | Jump to `name`, or else to what the name box means: the highlighted row, the bookmark named exactly as typed, or the first row offered. Answers the `goToBookmark` result and sets `problem` when it is refused. |
| move | (delta: number) => void | Move the highlight by `delta` rows, wrapping at either end. |
| problem | GoToBookmarkProblem | null | Why the last jump did not happen, or null. Cleared when the query changes. |
| problemName | string | The name the last refused jump asked for, for a message. Empty when nothing was typed. |
| query | string | The text in the name box. |
| rows | readonly BookmarkSummary[] | The bookmarks offered for the query: names that start with it first. |
| setActiveIndex | (index: number) => void | Highlight the row at `index` of `rows`, or none with -1. |
| setQuery | (query: string) => void | Change the text. The highlight goes back to none. |
| setSortBy | (sortBy: BookmarkSortOrder) => void | |
| sortBy | BookmarkSortOrder |
UseHistoryGroupReturninterfaceSource ↗
interface UseHistoryGroupReturn| Member | Type | Summary |
|---|---|---|
| options | () => EditorExecOptions | |
| ref | (element: HTMLElement | null) => void |
UseHyperlinkPopupResultinterfaceSource ↗
What useHyperlinkPopup answers.
interface UseHyperlinkPopupResult| Member | Type | Summary |
|---|---|---|
| beginEdit | () => void | Switch to editing, seeded from the link at the caret. |
| close | () => void | |
| commitEdit | () => boolean | Apply the draft. Answers false when the engine refused it (a bad scheme, no text). |
| copy | () => Promise<boolean> | Copy the sanitized target. Answers false when there is nothing safe to copy. |
| open | (link?: SurfaceHyperlink | null, anchor?: HyperlinkPopupAnchor | null) => void | Open in reading mode over a link, or in editing mode when there is none. |
| openAtCaret | () => void | Open insert-or-edit for the SELECTION — what Ctrl/Cmd+K and the toolbar's link button do. Anchors itself at the caret, seeds the display text from the selection, and opens edit mode pre-filled when the caret is already inside a link. |
| openTarget | () => boolean | Open the target in a new tab, through the engine's single `window.open` gate. Answers false for an inert link — there is nothing to open, and this never invents a URL. |
| setText | (text: string) => void | |
| setUrl | (url: string) => void | |
| state | HyperlinkPopupState | |
| unlink | () => boolean | Take the link off, keeping its text. |
UseNavigationPaneOptionsinterfaceSource ↗
How useNavigationPane is configured.
interface UseNavigationPaneOptions| Member | Type | Summary |
|---|---|---|
| defaultOpen? | boolean | Open state for the first render when the pane is uncontrolled. Defaults to closed. |
| defaultTab? | NavigationTab$1 | Tab shown first when uncontrolled. Defaults to `'headings'`. |
| onOpenChange? | (open: boolean) => void | |
| onTabChange? | (tab: NavigationTab$1) => void | |
| open? | boolean | Controlled open state. Pair with `onOpenChange`. |
| paneWidth? | number | Panel width in px. Defaults to [NAVIGATION_PANE_WIDTH](NAVIGATION_PANE_WIDTH). |
| tab? | NavigationTab$1 | Controlled tab. Pair with `onTabChange`. |
UseNavigationPaneResultinterfaceSource ↗
What useNavigationPane answers.
interface UseNavigationPaneResult| Member | Type | Summary |
|---|---|---|
| open | boolean | |
| overlay | boolean | Whether the open pane covers the page instead of moving it. True on a viewport too narrow to show a readable page beside the pane (see `NAVIGATION_PANE_MIN_PAGE_ROOM`); `shift` is then 0, and `DocxEditor.Navigation` closes after a heading or result is picked. |
| paneWidth | number | |
| setOpen | (open: boolean) => void | |
| setTab | (tab: NavigationTab$1) => void | |
| shift | number | Px the chrome is displaced by, right now. `0` while the pane is closed AND whenever the left gutter was already wide enough to hold it — which is the point. |
| tab | NavigationTab$1 | |
| toggle | () => void |
UseOpenFailureOptionsinterfaceSource ↗
Options for [useOpenFailure](useOpenFailure).
interface UseOpenFailureOptions| Member | Type | Summary |
|---|---|---|
| t? | TFunction | Translator override; defaults to the ambient locale context. |
UseOpenFailureReturninterfaceSource ↗
The current refused open, with the packaged message and a way to dismiss it.
interface UseOpenFailureReturn| Member | Type | Summary |
|---|---|---|
| dismiss | | Hide this refusal. A later refusal shows again, even for the same file. Pass the failure your UI showed, such as from a toast's close callback, so a late call cannot hide a newer refusal. It also works as a click handler directly, such as `onClick={dismiss}`: an event hides the refusal on screen. |
| failure | DocumentOpenFailure | null | The refused open, or `null` when there is none or the person dismissed it. |
| message | string | null | The packaged, translated message for [UseOpenFailureReturn.failure](UseOpenFailureReturn.failure). |
UsePageSetupDialogReturninterfaceSource ↗
Page Setup draft and actions.
interface UsePageSetupDialogReturn extends UseDialogReturn<PageSetupDialogFields>UsePageSetupReturninterfaceSource ↗
What usePageSetup returns.
interface UsePageSetupReturn| Member | Type | Summary |
|---|---|---|
| apply | (update: PageSetupUpdate) => boolean | Write the given fields as one undoable step. Returns whether the engine accepted. |
| isEnabled | boolean | Whether the engine can write page setup right now (mounted, editable). |
| pageSetup | PageSetup | null | The CARET section's page setup, or null while nothing is loaded. Reference-stable. |
UseParagraphDialogReturninterfaceSource ↗
Paragraph dialog draft, mixed values, and actions.
interface UseParagraphDialogReturn extends UseDialogReturn<ParagraphDialogFields>| Member | Type | Summary |
|---|---|---|
| mixed | ParagraphDialogMixed |
UseParagraphFormatReturninterfaceSource ↗
What useParagraphFormat returns.
interface UseParagraphFormatReturn| Member | Type | Summary |
|---|---|---|
| apply | (update: ParagraphFormatUpdate) => boolean | Write the given fields as ONE undoable step. Returns whether the engine accepted. |
| format | ParagraphFormatRead | null | The selection's paragraph formatting, or null while nothing is loaded. |
| isEnabled | boolean | Whether the engine can write paragraph formatting right now (mounted, editable). |
UseParagraphIndentReturninterfaceSource ↗
What useParagraphIndent returns.
interface UseParagraphIndentReturn| Member | Type | Summary |
|---|---|---|
| apply | (update: IndentUpdate) => boolean | Write the given fields as one undoable step. Returns whether the engine accepted. |
| indent | IndentFormatting | null | The EFFECTIVE indent at the selection — style and numbering cascade included — or null with no document, and inside a table. |
| isEnabled | boolean | Whether the engine can write indent right now (mounted, editable). |
UseParagraphStyleResultinterfaceSource ↗
What useParagraphStyle answers.
interface UseParagraphStyleResult| Member | Type | Summary |
|---|---|---|
| isEnabled | boolean | Whether the engine would honour a style change right now. |
| options | readonly ParagraphStyleOption[] | The document's paragraph styles — validated ids and display names, in the engine's Word-gallery order (Normal, Title, Subtitle, the headings, then everything else in document order), NOT the order `styles.xml` happens to list them in. |
| setValue | (styleId: string) => void | Apply a paragraph style through the can-before-exec path; a refusal is a safe no-op. |
| value | string | null | The selection's agreed paragraph styleId, or null (unstyled/default, or mixed). |
UseRevisionMarkupDialogReturninterfaceSource ↗
Revision markup draft and actions.
interface UseRevisionMarkupDialogReturn extends UseDialogReturn<ResolvedRevisionMarkup>| Member | Type | Summary |
|---|---|---|
| reset | |
UseSplitCellDialogReturninterfaceSource ↗
Split cells dialog draft and actions. apply is Split.
interface UseSplitCellDialogReturn extends UseDialogReturn<SplitCellDialogFields>| Member | Type | Summary |
|---|---|---|
| limits | SplitCellLimits | null | The most columns and rows the cell splits into, or null outside a cell that splits. |
UseTextFormFieldDialogReturninterfaceSource ↗
Field Options draft and actions.
interface UseTextFormFieldDialogReturn extends UseDialogReturn<TextFormFieldDialogFields>UseWatermarkDialogReturninterfaceSource ↗
Watermark dialog draft and actions.
interface UseWatermarkDialogReturn extends UseDialogReturn<WatermarkDialogFields>UseWatermarkReturninterfaceSource ↗
What useWatermark returns.
interface UseWatermarkReturn| Member | Type | Summary |
|---|---|---|
| apply | (watermark: Watermark | null) => ExecResult | Set the watermark as one undo step. Null removes it. |
| isEnabled | boolean | Whether the engine can write a watermark right now (mounted, editable). |
| read | () => Watermark | null | The full current watermark, with picture bytes, through `query({ type: 'watermark' })`. |
| watermark | WatermarkState | null | The document's watermark, or null when it has none. Reference-stable while unchanged. |
UseZoomResultinterfaceSource ↗
What [useZoom](useZoom) answers.
interface UseZoomResult| Member | Type | Summary |
|---|---|---|
| auto | () => void | The default: fit the page width, never past 100%. |
| canZoomIn | boolean | |
| canZoomOut | boolean | |
| fitToWidth | () => void | Fit the page width and keep fitting: shrink AND grow with the viewport. |
| isFit | boolean | Whether the editor is tracking the viewport rather than holding a number. |
| levels | readonly number[] | The ladder the steppers walk, so a custom control shows the same levels. |
| mode | ZoomMode | Where [UseZoomResult.zoom](UseZoomResult.zoom) came from. Fixed until an implementation says otherwise. |
| reset | () => void | Back to a plain, untracked 100%. |
| setMode | (mode: ZoomMode | 'auto') => void | |
| setZoom | (zoom: number) => void | Set a fixed scale. Leaves any fit mode, the same as picking a level in the toolbar. |
| zoom | number | The scale in force, resolved. 1 is 100%. |
| zoomIn | () => void | |
| zoomOut | () => void |
VerticalRulerPropsinterfaceSource ↗
VerticalRuler Component
A vertical ruler that displays alongside the document with: - Page height scale with tick marks - Top and bottom margin indicators - Optional dragging to adjust margins - Support for zoom levels
Similar to Google Docs' vertical ruler.
interface VerticalRulerProps| Member | Type | Summary |
|---|---|---|
| className? | string | Additional CSS class name |
| editable? | boolean | Whether margins can be dragged to adjust |
| onBottomMarginChange? | (marginTwips: number) => void | Callback when bottom margin changes (in twips) |
| onMarginDragEnd? | () => void | Fires when a margin drag is released — the moment to commit what the drag previewed. |
| onTopMarginChange? | (marginTwips: number) => void | Callback when top margin changes (in twips) |
| pageSetup? | RulerPageSetup | null | Section page setup (`Editor.getPageSetup()`), twips throughout |
| style? | CSSProperties | Additional inline styles |
| unit? | 'inch' | 'cm' | Unit to display (inches or cm) |
| zoom? | number | Zoom level (1.0 = 100%) |
WatermarkDialogFieldsinterfaceSource ↗
The Watermark dialog draft. Transparency is 0 to 1, color is RRGGBB.
interface WatermarkDialogFields| Member | Type | Summary |
|---|---|---|
| bold | boolean | |
| color | string | |
| fontFamily | string | |
| fontSizePt | number | null | Points. Null is Auto. |
| imageData | Uint8Array | null | The picture bytes, or null when no picture is chosen. |
| imageName | string | null | The chosen file name. Null for no picture or for the document's current picture. |
| italic | boolean | |
| kind | WatermarkDialogKind | |
| layout | WatermarkDialogLayout | |
| scale | number | null | A factor of the picture's natural size. Null is Auto. |
| text | string | |
| transparency | number | |
| washout | boolean |
Type aliases (38)
ChromeTranslatetypeSource ↗
A chrome-part label resolver: plain string keys, optional interpolation params.
This is the shape every packaged part's t prop accepts. It takes string rather than the TranslationKey union so a host can route its own extra keys through the same resolver.
type ChromeTranslate = (key: string, params?: Record<string, string | number>) => string;ContentControlLocktypeSource ↗
OOXML content-control lock axis, mirrored from layout boundary records for the React-only inspector surface — adapters must not import the layout package.
type ContentControlLock = 'unlocked' | 'sdtLocked' | 'contentLocked' | 'sdtContentLocked';ContentControlSlotIdtypeSource ↗
type ContentControlSlotId = (typeof CONTENT_CONTROL_SLOTS)[keyof typeof CONTENT_CONTROL_SLOTS];DocumentStyleSummarytypeSource ↗
One entry of Editor.getDocumentStyles() — the engine's document-style summary the picker consumes. Derived from the contract, not re-declared.
type DocumentStyleSummary = ReturnType<Editor['getDocumentStyles']>[number];DocxEditorChildrentypeSource ↗
Slot and icon content in public component props.
React hosts pass [ReactNode](ReactNode). Vue hosts pass [VNode](https://vuejs.org/api/utility-types.html#vnode) through the paired [DocxEditorChildren](DocxEditorChildren) alias in @docx-editor.dev/vue.
type DocxEditorChildren = ReactNode;DocxEditorOpenFailureMessagetypeSource ↗
A message for the open-failure dialog: text, content, or a function of the failure. It renders in a div, so block content is valid.
type DocxEditorOpenFailureMessage = string | DocxEditorChildren | ((failure: DocumentOpenFailure) => string | DocxEditorChildren);DocxEditorPopuptypeSource ↗
A render callback for an automatic popup. false disables automatic rendering.
type DocxEditorPopup<Props extends object> = false | ((props: Props) => DocxEditorChildren | null);DocxEditorRefCallbacktypeSource ↗
type DocxEditorRefCallback<T> = (node: T | null) => void;DocxFontOrigintypeSource ↗
One entry of a fonts list: any [FontOrigin](FontOrigin), or the older zero-argument loader.
The resolver arm of FontOrigin is a MARKED resolver, so handing this a function that takes a request but never went through defineFontResolver is a compile error rather than a silent total loss of fonts — it matches neither arm, because a one-argument function is not assignable to the zero-argument loader.
type DocxFontOrigin = FontOrigin | (() => DocxFontsInput | Promise<DocxFontsInput>);DocxFontsInputtypeSource ↗
A complete configuration, or a fragment this hook composes with the defaults.
type DocxFontsInput = FontConfiguration | FontConfigurationFragment;DocxFontsSourcetypeSource ↗
How a host supplies fonts: one origin, or a list of them in precedence order.
packagedFonts() and googleFonts() are the useful ones — they resolve per document, loading a family when the file names it or when it is that file's default face, rather than loading every family they could serve. A list composes them first-wins: { fonts: [packagedFonts(), googleFonts()] } serves the bundled faces and reaches the catalog only for what they do not cover.
The zero-argument loader form ({ fonts: defaultFonts }) still works and still loads everything up front. It is the one form that holds the document back until fonts settle.
type DocxFontsSource = DocxFontOrigin | readonly DocxFontOrigin[];DocxSourcetypeSource ↗
What the document itself can be: a URL to fetch, or bytes already in hand.
A string here is ALWAYS a URL — this hook exists to fetch one. That is the opposite of the document prop, whose DocumentSource reads the string 'blank' as Word's blank template; useDocxSource('blank') would request ./blank and report the 404. There is nothing to fetch for an empty document, so pass 'blank' straight to document.
type DocxSource = string | URL | Uint8Array | ArrayBuffer;EditorModetypeSource ↗
type EditorMode = 'edit' | 'view' | 'suggesting';FontsInputtypeSource ↗
Anything that can describe fonts: a resolved configuration, a bare fragment, a promise for either (what a loader like defaultFonts() returns), or an on-demand [FontResolver](FontResolver) (what packagedFonts() and googleFonts() return).
The resolver arm is BARE FontResolver, unmarked. FontOrigin — what a list position takes — requires the defineFontResolver mark, because a list may also hold a zero-argument loader and only the mark separates the two. There is no such ambiguity in the first argument of [useFonts](useFonts), which has never accepted a loader, so it keeps taking any resolver.
type FontsInput = FontConfiguration | FontConfigurationFragment | FontResolver | Promise<FontConfiguration | FontConfigurationFragment | undefined> | undefined;FormattingActiontypeSource ↗
Formatting action types
type FormattingAction = 'bold' | 'italic' | 'underline' | 'strikethrough' | 'superscript' | 'subscript' | 'clearFormatting' | 'bulletList' | 'numberedList' | 'indent' | 'outdent' | 'insertLink' | 'setRtl' | 'setLtr' | {
type: 'fontFamily';
value: string;
} | {
type: 'fontSize';
value: number;
} | {
type: 'textColor';
value: ColorValue | string;
} | {
type: 'highlightColor';
value: string;
} | {
type: 'alignment';
value: ParagraphAlignment;
} | {
type: 'lineSpacing';
value: number;
} | {
type: 'applyStyle';
value: string;
};GoToBookmarkProblemtypeSource ↗
Why a Go To jump did not happen: nothing was typed, no bookmark has the name, or the editor refused the jump for another reason (it is not ready, or the story could not be shown).
type GoToBookmarkProblem = 'empty' | 'notFound' | 'failed';HeaderFooterStatetypeSource ↗
Live furniture scope state from Editor.getHeaderFooterState().
type HeaderFooterState = Exclude<ReturnType<Editor['getHeaderFooterState']>, null>;HyperlinkPopupModetypeSource ↗
What the popover is showing.
type HyperlinkPopupMode =
/** Not shown. */
'closed'
/** An existing link: its target, plus copy / edit / unlink. */
| 'reading'
/** Text + URL fields, for a new link or a change to an existing one. */
| 'editing';ListTypetypeSource ↗
Pure list-state helpers used by both adapter toolbars to track whether the selection is in a bullet/numbered list and at what indent level. Lifted from packages/react/src/components/ui/ ListButtons.tsx so the React + Vue toolbars share identical state-mutation logic.
type ListType = 'bullet' | 'numbered' | 'none';MaybeRefOrGettertypeSource ↗
React composables take plain values; parity name matches the Vue surface.
type MaybeRefOrGetter<T> = T;MenuIdtypeSource ↗
A menu's identity: one of the registry's five, or a HOST'S OWN.
The (string & {}) arm keeps the registry ids as editor autocomplete while accepting any other string, so a product can add "Review" or "Clauses" without the library having to know about it. Lives here rather than in parts because the bar's open/active state is keyed on it and both modules read that state.
type MenuId = ChromeMenuId | (string & {});MenuReviewersPropstypeSource ↗
type MenuReviewersProps = {
className?: string;
hidden?: boolean;
};NavigationTabValuetype
The pane's tabs: the outline, Find, and Go to (bookmarks).
type NavigationTab$1 = 'headings' | 'find' | 'goto';NormalizedImagePayloadtypeSource ↗
type NormalizedImagePayload = {
readonly ok: true;
readonly bytes: Uint8Array;
readonly mime: SupportedImageMime;
readonly widthPoints: number;
readonly heightPoints: number;
} | {
readonly ok: false;
readonly reasonKey: string;
};NotePropertiesStatetypeSource ↗
type NotePropertiesState = Exclude<ReturnType<Editor['getNotePropertiesState']>, null>;OutlineHeadingtypeSource ↗
One heading of the engine's outline: text, 0-based level, and the block id Editor.scrollToBlock accepts.
type OutlineHeading$1 = ReturnType<Editor['getOutline']>[number];PaginatedDocxEditorExposetypeSource ↗
Vue name for the same handle contract.
type PaginatedDocxEditorExpose = PaginatedDocxEditorHandle;ParagraphAlignmenttypeSource ↗
The paragraph alignments this control understands, in OOXML w:jc vocabulary (both is Word's justify; distribute renders as justify). Presentation-only: the dropdown emits the first four.
type ParagraphAlignment = 'left' | 'center' | 'right' | 'both' | 'distribute';ResolvedColorModetypeSource ↗
The theme the enclosing editor resolved from colorMode, never 'system', as [useEditorColorMode](useEditorColorMode) reports it.
type ResolvedColorMode = 'light' | 'dark';ScopedChromeAnchorPlacementtypeSource ↗
Where a scoped chrome anchor sits relative to its story: before it, after it, or on its label.
type ScopedChromeAnchorPlacement = 'before' | 'after' | 'story-label';TableActiontypeSource ↗
Table editing action types
type TableAction = 'addRowAbove' | 'addRowBelow' | 'addColumnLeft' | 'addColumnRight' | 'deleteRow' | 'deleteColumn' | 'mergeCells' | 'splitCell' | 'deleteTable' | 'selectTable' | 'selectRow' | 'selectColumn' | 'borderAll' | 'borderOutside' | 'borderInside' | 'borderNone' | 'borderTop' | 'borderBottom' | 'borderLeft' | 'borderRight' | {
type: 'cellFillColor';
color: string | null;
} | {
type: 'borderColor';
color: string;
} | {
type: 'borderWidth';
size: number;
} | {
type: 'cellBorder';
side: 'top' | 'bottom' | 'left' | 'right' | 'all';
style: string;
size: number;
color: string;
} | {
type: 'cellVerticalAlign';
align: 'top' | 'center' | 'bottom';
} | {
type: 'cellMargins';
margins: {
top?: number;
bottom?: number;
left?: number;
right?: number;
};
} | {
type: 'cellTextDirection';
direction: string | null;
} | {
type: 'toggleNoWrap';
} | {
type: 'rowHeight';
height: number | null;
rule?: 'auto' | 'atLeast' | 'exact';
} | {
type: 'toggleHeaderRow';
} | {
type: 'distributeColumns';
} | {
type: 'autoFitContents';
} | {
type: 'tableProperties';
props: {
width?: number | null;
widthType?: string | null;
justification?: 'left' | 'center' | 'right' | null;
};
} | {
type: 'openTableProperties';
} | {
type: 'applyTableStyle';
styleId: string;
};ToolbarPartPropstypeSource ↗
Props for the named parts (DocxEditorToolbar.Bold, ...): the slot is pinned.
type ToolbarPartProps = Omit<ToolbarButtonProps$1, 'slot'>;ToolbarReviewersPropstypeSource ↗
Props for DocxEditor.Toolbar.Reviewers.
type ToolbarReviewersProps = {
className?: string;
hidden?: boolean;
icon?: DocxEditorChildren;
};ToolbarTranslatetypeSource ↗
Resolves an i18n key to display text.
type ToolbarTranslate = (key: string) => string;UseEditorHostDocumentReturntypeSource ↗
What [useEditorHostDocument](useEditorHostDocument) returns: the host document, or null on the server.
type UseEditorHostDocumentReturn = Document | null;WatermarkDialogFieldNametypeSource ↗
Named controls a host can replace with DocxEditor.WatermarkDialog.Field.
type WatermarkDialogFieldName = 'noWatermark' | 'pictureWatermark' | 'picture' | 'scale' | 'washout' | 'textWatermark' | 'preset' | 'text' | 'fontFamily' | 'fontSizePt' | 'bold' | 'italic' | 'transparency' | 'color' | 'layout';WatermarkDialogKindtypeSource ↗
Which watermark the dialog writes.
type WatermarkDialogKind = 'none' | 'picture' | 'text';WatermarkDialogLayouttypeSource ↗
How a text watermark crosses the page.
type WatermarkDialogLayout = NonNullable<WatermarkState['layout']>;Variables (54)
CONTENT_CONTROL_SLOTSconstSource ↗
Chrome slots for the content-control group (design S14).
CONTENT_CONTROL_SLOTS: {
readonly showAll: 'contentControl.showAll';
readonly formFill: 'contentControl.formFill';
readonly inspector: 'contentControl.inspector';
readonly remove: 'contentControl.remove';
}ContextMenuCopyconstSource ↗
Copy the selection. Stays available in a read-only document.
ContextMenuCopy: (({ icon, labelKey, shortcutKey, className, hidden }: ContextMenuCommandProps) => react.JSX.Element | null) & {
docxRow: string;
}ContextMenuCopyFormattingconstSource ↗
Copy the formatting at the selection — the Format Painter's read half.
Stays available in a read-only document, like Copy: it writes nothing.
ContextMenuCopyFormatting: (({ icon, labelKey, shortcutKey, className, hidden }: ContextMenuCommandProps) => react.JSX.Element | null) & {
docxRow: string;
}ContextMenuCutconstSource ↗
Cut the selection to the clipboard. Disabled with the engine's reason when nothing is selected.
ContextMenuCut: (({ icon, labelKey, shortcutKey, className, hidden }: ContextMenuCommandProps) => react.JSX.Element | null) & {
docxRow: string;
}ContextMenuDeleteconstSource ↗
Delete the selection.
ContextMenuDelete: (({ icon, labelKey, shortcutKey, className, hidden }: ContextMenuCommandProps) => react.JSX.Element | null) & {
docxRow: string;
}ContextMenuDeleteTableconstSource ↗
Delete the entire table.
ContextMenuDeleteTable: (({ icon, labelKey, className, hidden, destructive }: ContextMenuTableRowProps) => react.JSX.Element | null) & {
docxRow: string;
}ContextMenuDeleteTableColumnconstSource ↗
Delete the current table column.
ContextMenuDeleteTableColumn: (({ icon, labelKey, className, hidden, destructive }: ContextMenuTableRowProps) => react.JSX.Element | null) & {
docxRow: string;
}ContextMenuDeleteTableRowconstSource ↗
Delete the current table row.
ContextMenuDeleteTableRow: (({ icon, labelKey, className, hidden, destructive }: ContextMenuTableRowProps) => react.JSX.Element | null) & {
docxRow: string;
}ContextMenuInsertColumnLeftconstSource ↗
Insert a column to the left of the current column.
ContextMenuInsertColumnLeft: (({ icon, labelKey, className, hidden, destructive }: ContextMenuTableRowProps) => react.JSX.Element | null) & {
docxRow: string;
}ContextMenuInsertColumnRightconstSource ↗
Insert a column to the right of the current column.
ContextMenuInsertColumnRight: (({ icon, labelKey, className, hidden, destructive }: ContextMenuTableRowProps) => react.JSX.Element | null) & {
docxRow: string;
}ContextMenuInsertRowAboveconstSource ↗
Insert a row above the current table row.
ContextMenuInsertRowAbove: (({ icon, labelKey, className, hidden, destructive }: ContextMenuTableRowProps) => react.JSX.Element | null) & {
docxRow: string;
}ContextMenuInsertRowBelowconstSource ↗
Insert a row below the current table row.
ContextMenuInsertRowBelow: (({ icon, labelKey, className, hidden, destructive }: ContextMenuTableRowProps) => react.JSX.Element | null) & {
docxRow: string;
}ContextMenuMergeCellsconstSource ↗
Merge the selected cells into one cell.
ContextMenuMergeCells: (({ icon, labelKey, className, hidden, destructive }: ContextMenuTableRowProps) => react.JSX.Element | null) & {
docxRow: string;
}ContextMenuPasteFormattingconstSource ↗
Apply the copied formatting to the selection.
Disabled with the engine's own reason until something has been copied, so the row says why rather than looking live and doing nothing.
ContextMenuPasteFormatting: (({ icon, labelKey, shortcutKey, className, hidden }: ContextMenuCommandProps) => react.JSX.Element | null) & {
docxRow: string;
}ContextMenuRefreshTocconstSource ↗
Rebuild the pointed-at table of contents from the document's headings.
ContextMenuRefreshToc: (({ icon, labelKey, className, hidden }: ContextMenuCommandProps) => react.JSX.Element | null) & {
docxRow: string;
}ContextMenuRefreshTocPageNumbersconstSource ↗
Re-resolve only the page numbers of the pointed-at table of contents.
ContextMenuRefreshTocPageNumbers: (({ icon, labelKey, className, hidden }: ContextMenuCommandProps) => react.JSX.Element | null) & {
docxRow: string;
}ContextMenuRemoveTocconstSource ↗
Remove the pointed-at table of contents, with its control and heading.
ContextMenuRemoveToc: (({ icon, labelKey, className, hidden }: ContextMenuCommandProps) => react.JSX.Element | null) & {
docxRow: string;
}ContextMenuSelectAllconstSource ↗
Select the whole body.
ContextMenuSelectAll: (({ icon, labelKey, shortcutKey, className, hidden }: ContextMenuCommandProps) => react.JSX.Element | null) & {
docxRow: string;
}ContextMenuSelectTableconstSource ↗
Select every cell of the table at the selection.
ContextMenuSelectTable: (({ icon, labelKey, className, hidden, destructive }: ContextMenuTableRowProps) => react.JSX.Element | null) & {
docxRow: string;
}ContextMenuSplitCellconstSource ↗
Open the Split cells dialog for the cell at the selection.
ContextMenuSplitCell: (({ icon, labelKey, className, hidden }: ContextMenuCommandProps) => react.JSX.Element | null) & {
docxRow: string;
}DEFAULT_WATERMARK_PRESETSconstSource ↗
The text choices the dialog offers when the host passes no presets.
DEFAULT_WATERMARK_PRESETS: readonly string[]DocumentOutlineconstSource ↗
DocumentOutline: react__default.MemoExoticComponent<({ headings, onHeadingClick, onClose, topOffset, scrollLeft, leftOffset, }: DocumentOutlineProps) => react__default.JSX.Element>DocxEditorconstSource ↗
DocxEditor: DocxEditorNamespaceDocxEditorBookmarkDialogconstSource ↗
The Bookmark dialog with replaceable controls and layout.
DocxEditorBookmarkDialog: typeof BookmarkDialogRoot & {
Header: (props: DialogPartProps & {
name?: "list" | "name" | "showHidden" | "sortBy" | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Title: (props: DialogPartProps & {
name?: "list" | "name" | "showHidden" | "sortBy" | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Body: (props: DialogPartProps & {
name?: "list" | "name" | "showHidden" | "sortBy" | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Footer: (props: DialogPartProps & {
name?: "list" | "name" | "showHidden" | "sortBy" | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Apply: (props: DialogPartProps & {
name?: "list" | "name" | "showHidden" | "sortBy" | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Cancel: (props: DialogPartProps & {
name?: "list" | "name" | "showHidden" | "sortBy" | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Error: (props: DialogPartProps & {
name?: "list" | "name" | "showHidden" | "sortBy" | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Field: (props: DialogPartProps & {
name: "list" | "name" | "showHidden" | "sortBy";
}) => ReactNode;
Delete: PartComponent;
GoTo: PartComponent;
KeepFirst: PartComponent;
}DocxEditorCompareDocumentsDialogconstSource ↗
Compare documents with replaceable controls and layout.
DocxEditorCompareDocumentsDialog: typeof CompareDocumentsDialogRoot & {
Header: (props: DialogPartProps & {
name?: keyof CompareDocumentsDialogValues | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Title: (props: DialogPartProps & {
name?: keyof CompareDocumentsDialogValues | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Body: (props: DialogPartProps & {
name?: keyof CompareDocumentsDialogValues | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Footer: (props: DialogPartProps & {
name?: keyof CompareDocumentsDialogValues | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Apply: (props: DialogPartProps & {
name?: keyof CompareDocumentsDialogValues | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Cancel: (props: DialogPartProps & {
name?: keyof CompareDocumentsDialogValues | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Error: (props: DialogPartProps & {
name?: keyof CompareDocumentsDialogValues | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Field: (props: DialogPartProps & {
name: keyof CompareDocumentsDialogValues;
}) => react.ReactNode;
Progress: (props: DialogPartProps) => react.ReactNode;
Notice: (props: DialogPartProps) => react.ReactNode;
}DocxEditorContentControlconstSource ↗
DocxEditorContentControl: DocxEditorContentControlNamespaceDocxEditorContentControlWidgetconstSource ↗
Compact value editor for a configured content-control popup.
DocxEditorContentControlWidget: DocxEditorContentControlWidgetNamespaceDocxEditorHyperLinkconstSource ↗
DocxEditorHyperLink: DocxEditorHyperLinkNamespaceDocxEditorLoadingconstSource ↗
Renders its children while the editor is still waiting for a document, and nothing once one is available. No condition to wire up in the common case:
tsx
<DocxEditor.Root document={bytes}>
<DocxEditor.Loading>
<MySpinner />
</DocxEditor.Loading>
<DocxEditor.Viewport>
<DocxEditor.Content />
</DocxEditor.Viewport>
</DocxEditor.Root>
It covers TWO windows. Before bytes arrive it is the empty-state screen. And while a LARGE document opens — the engine mounts it behind one painted frame precisely so this screen can paint before the blocking parse and layout — it holds until the pages land; pass overlay to pin it over the previous document for that window. With overlay, once the first pages show, the indicator moves below the laid-out pages until the rest are laid out. Pass indicator to replace only the spinner, in both places:
tsx
<DocxEditor.Loading overlay indicator={<MyLogoSpinner label="Opening document" />} />
A parse failure clears both, so a broken document never spins forever; report that from snapshot().parseError or the error event. Add when only for async the editor cannot observe, typically a host that mounts the provider after its own fetch.
A host gating its own DocxEditor.Content must key that on snapshot().isLoading, which clears as soon as bytes are handed over — never on isOpening, whose scheduled mount needs the mount point to stay in the tree.
Rendered OUTSIDE a DocxEditor.Root it always shows, because there is no editor to report otherwise — the same rule useEditorState documents for a null editor. Place it inside the provider unless a permanently-visible placeholder is what you want.
Carries its own docx-editor, so the theme tokens resolve wherever it is composed.
DocxEditorLoading: DocxEditorLoadingComponentDocxEditorMenuconstSource ↗
The compound menu bar: <DocxEditor.Menu/> for File · Format · Insert · Review · Help, parts as statics for composition.
Every actionable row is a chrome slot, so a row and its toolbar twin share one label, one icon, one command and one enabled state. Rows the engine cannot honour yet render present and disabled, carrying the engine's own reason.
DocxEditorMenu: DocxEditorMenuNamespaceDocxEditorOpenFailureconstSource ↗
A dialog that explains why a file did not open. It shows nothing until the editor refuses a document, and shows again for each later refusal. <DocxEditor> renders it by default; compose it yourself inside a DocxEditor.Root:
tsx
<DocxEditor.Root document={bytes}>
<DocxEditor.OpenFailure
actions={({ failure }) => (
<DocxEditor.OpenFailure.Action variant="primary" onClick={() => report(failure.code)}>
Report
</DocxEditor.OpenFailure.Action>
)}
/>
<DocxEditor.Viewport>
<DocxEditor.Content />
</DocxEditor.Viewport>
</DocxEditor.Root>
The packaged message is generic and names no contact. For a toast or banner instead of a dialog, use useOpenFailure.
DocxEditorOpenFailure: DocxEditorOpenFailureComponentDocxEditorPageSetupDialogconstSource ↗
Page Setup with replaceable controls and layout.
DocxEditorPageSetupDialog: typeof PageSetupDialogRoot & {
Header: (props: DialogPartProps & {
name?: "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "orientation" | "pageSize" | "scope" | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Title: (props: DialogPartProps & {
name?: "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "orientation" | "pageSize" | "scope" | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Body: (props: DialogPartProps & {
name?: "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "orientation" | "pageSize" | "scope" | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Footer: (props: DialogPartProps & {
name?: "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "orientation" | "pageSize" | "scope" | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Apply: (props: DialogPartProps & {
name?: "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "orientation" | "pageSize" | "scope" | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Cancel: (props: DialogPartProps & {
name?: "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "orientation" | "pageSize" | "scope" | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Error: (props: DialogPartProps & {
name?: "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "orientation" | "pageSize" | "scope" | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Field: (props: DialogPartProps & {
name: "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "orientation" | "pageSize" | "scope";
}) => react.ReactNode;
}DocxEditorParagraphDialogconstSource ↗
Paragraph Options with replaceable controls and layout.
DocxEditorParagraphDialog: typeof ParagraphDialogRoot & {
Header: (props: DialogPartProps & {
name?: "alignment" | "contextualSpacing" | "direction" | "indentLeft" | "indentRight" | "keepLines" | "keepNext" | "lineRule" | "lineValue" | "pageBreakBefore" | "spaceAfter" | "spaceBefore" | "special" | "specialBy" | "tabStops" | "widowControl" | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Title: (props: DialogPartProps & {
name?: "alignment" | "contextualSpacing" | "direction" | "indentLeft" | "indentRight" | "keepLines" | "keepNext" | "lineRule" | "lineValue" | "pageBreakBefore" | "spaceAfter" | "spaceBefore" | "special" | "specialBy" | "tabStops" | "widowControl" | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Body: (props: DialogPartProps & {
name?: "alignment" | "contextualSpacing" | "direction" | "indentLeft" | "indentRight" | "keepLines" | "keepNext" | "lineRule" | "lineValue" | "pageBreakBefore" | "spaceAfter" | "spaceBefore" | "special" | "specialBy" | "tabStops" | "widowControl" | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Footer: (props: DialogPartProps & {
name?: "alignment" | "contextualSpacing" | "direction" | "indentLeft" | "indentRight" | "keepLines" | "keepNext" | "lineRule" | "lineValue" | "pageBreakBefore" | "spaceAfter" | "spaceBefore" | "special" | "specialBy" | "tabStops" | "widowControl" | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Apply: (props: DialogPartProps & {
name?: "alignment" | "contextualSpacing" | "direction" | "indentLeft" | "indentRight" | "keepLines" | "keepNext" | "lineRule" | "lineValue" | "pageBreakBefore" | "spaceAfter" | "spaceBefore" | "special" | "specialBy" | "tabStops" | "widowControl" | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Cancel: (props: DialogPartProps & {
name?: "alignment" | "contextualSpacing" | "direction" | "indentLeft" | "indentRight" | "keepLines" | "keepNext" | "lineRule" | "lineValue" | "pageBreakBefore" | "spaceAfter" | "spaceBefore" | "special" | "specialBy" | "tabStops" | "widowControl" | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Error: (props: DialogPartProps & {
name?: "alignment" | "contextualSpacing" | "direction" | "indentLeft" | "indentRight" | "keepLines" | "keepNext" | "lineRule" | "lineValue" | "pageBreakBefore" | "spaceAfter" | "spaceBefore" | "special" | "specialBy" | "tabStops" | "widowControl" | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Field: (props: DialogPartProps & {
name: "alignment" | "contextualSpacing" | "direction" | "indentLeft" | "indentRight" | "keepLines" | "keepNext" | "lineRule" | "lineValue" | "pageBreakBefore" | "spaceAfter" | "spaceBefore" | "special" | "specialBy" | "tabStops" | "widowControl";
}) => react.ReactNode;
}DocxEditorRevisionMarkupDialogconstSource ↗
Track changes options with replaceable controls and layout.
DocxEditorRevisionMarkupDialog: typeof RevisionMarkupDialogRoot & {
Header: (props: DialogPartProps & {
name?: keyof ResolvedRevisionMarkup | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Title: (props: DialogPartProps & {
name?: keyof ResolvedRevisionMarkup | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Body: (props: DialogPartProps & {
name?: keyof ResolvedRevisionMarkup | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Footer: (props: DialogPartProps & {
name?: keyof ResolvedRevisionMarkup | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Apply: (props: DialogPartProps & {
name?: keyof ResolvedRevisionMarkup | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Cancel: (props: DialogPartProps & {
name?: keyof ResolvedRevisionMarkup | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Error: (props: DialogPartProps & {
name?: keyof ResolvedRevisionMarkup | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Field: (props: DialogPartProps & {
name: keyof ResolvedRevisionMarkup;
}) => react.ReactNode;
Reset: (props: DialogPartProps & {
name?: keyof ResolvedRevisionMarkup | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
}DocxEditorSplitCellDialogconstSource ↗
The Split cells dialog with replaceable controls and layout.
DocxEditorSplitCellDialog: typeof SplitCellDialogRoot & {
Header: (props: DialogPartProps & {
name?: "columns" | "rows" | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Title: (props: DialogPartProps & {
name?: "columns" | "rows" | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Body: (props: DialogPartProps & {
name?: "columns" | "rows" | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Footer: (props: DialogPartProps & {
name?: "columns" | "rows" | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Apply: (props: DialogPartProps & {
name?: "columns" | "rows" | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Cancel: (props: DialogPartProps & {
name?: "columns" | "rows" | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Error: (props: DialogPartProps & {
name?: "columns" | "rows" | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Field: (props: DialogPartProps & {
name: "columns" | "rows";
}) => react.ReactNode;
}DocxEditorTextFormFieldDialogconstSource ↗
Legacy text Field Options with replaceable controls and layout.
DocxEditorTextFormFieldDialog: typeof TextFormFieldDialogRoot & {
Header: (props: DialogPartProps & {
name?: keyof TextFormFieldDialogFields | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Title: (props: DialogPartProps & {
name?: keyof TextFormFieldDialogFields | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Body: (props: DialogPartProps & {
name?: keyof TextFormFieldDialogFields | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Footer: (props: DialogPartProps & {
name?: keyof TextFormFieldDialogFields | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Apply: (props: DialogPartProps & {
name?: keyof TextFormFieldDialogFields | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Cancel: (props: DialogPartProps & {
name?: keyof TextFormFieldDialogFields | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Error: (props: DialogPartProps & {
name?: keyof TextFormFieldDialogFields | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | Iterable<react.ReactNode> | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Field: (props: DialogPartProps & {
name: keyof TextFormFieldDialogFields;
}) => react.ReactNode;
}DocxEditorToolbarconstSource ↗
The compound toolbar: <DocxEditor.Toolbar/> for the full working chrome, parts as statics for composition (<DocxEditor.Toolbar><DocxEditor.Toolbar.Bold/>...).
DocxEditorToolbar: DocxEditorToolbarNamespaceDocxEditorWatermarkDialogconstSource ↗
Watermark dialog: no watermark, a picture, or text, with a live page preview and replaceable controls and layout. Applies the whole form as one undoable setWatermark command, and writes nothing when the form is unchanged.
DocxEditorWatermarkDialog: typeof WatermarkDialogRoot & {
Header: (props: DialogPartProps & {
name?: WatermarkDialogFieldName | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Title: (props: DialogPartProps & {
name?: WatermarkDialogFieldName | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Body: (props: DialogPartProps & {
name?: WatermarkDialogFieldName | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Preview: (props: DialogPartProps) => ReactNode;
Footer: (props: DialogPartProps & {
name?: WatermarkDialogFieldName | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Apply: (props: DialogPartProps & {
name?: WatermarkDialogFieldName | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Cancel: (props: DialogPartProps & {
name?: WatermarkDialogFieldName | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Error: (props: DialogPartProps & {
name?: WatermarkDialogFieldName | undefined;
}) => string | number | bigint | boolean | react.JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | Iterable<ReactNode> | ReactElement<unknown, string | react.JSXElementConstructor<any>> | react.ReactPortal | null | undefined> | null;
Field: (props: DialogPartProps & {
name: WatermarkDialogFieldName;
}) => ReactNode;
}NAVIGATION_PANE_GAPconstSource ↗
Clearance kept between the panel's right edge and the page.
NAVIGATION_PANE_GAP = 16NAVIGATION_PANE_INSETconstSource ↗
Gap between the viewport's left edge and the panel.
Clears a vertical ruler: RULER_WIDTH is 20px pinned at the viewport's left edge, so anything less puts the panel and its collapsed disc on top of the tick marks.
NAVIGATION_PANE_INSET = 32NAVIGATION_PANE_MIN_PAGE_ROOMconstSource ↗
The narrowest page column, in px, an open pane must leave beside it.
Below it a shift cannot help: a 390px phone viewport less the default 328px reservation leaves a 62px strip of page. There the pane overlays the page instead, at the viewport's full width less its inset on each side, and the page does not move.
NAVIGATION_PANE_MIN_PAGE_ROOM = 320NAVIGATION_PANE_WIDTHconstSource ↗
Panel width, in px, when the host does not choose one.
NAVIGATION_PANE_WIDTH = 280OUTLINE_BUTTON_LEFT_OFFSETconstSource ↗
OUTLINE_BUTTON_LEFT_OFFSET = 12OUTLINE_BUTTON_RESERVED_SPACEconstSource ↗
OUTLINE_BUTTON_RESERVED_SPACE: numberOUTLINE_LEFT_OFFSETconstSource ↗
OUTLINE_LEFT_OFFSET = 12OUTLINE_RESERVED_SPACEconstSource ↗
OUTLINE_RESERVED_SPACE: numberPageNumberTranslationContextconstSource ↗
Internal bridge from the batteries-included editor's t prop to this composition part.
PageNumberTranslationContext: react.Context<((key: string) => string) | null>REVIEW_MARKERS_GUTTERconstSource ↗
The marker strip: anchors and the add-comment button, no cards.
REVIEW_MARKERS_GUTTER = 44REVIEW_PANE_GUTTERconstSource ↗
Full reservation: the 300px card column plus its 16px gutter off the page edge.
REVIEW_PANE_GUTTER = 316ReviewRailContextconstSource ↗
ReviewRailContext: react.Context<ReviewRailRegistry | null>RULER_WIDTHconstSource ↗
RULER_WIDTH = 20ToolbarContextconstSource ↗
ToolbarContext: react.Context<ToolbarContextValue>ToolbarImagePropertiesconstSource ↗
ToolbarImageProperties: typeof ImagePropertiesTrigger & {
docxSlot: 'image.properties';
}VERSIONconstSource ↗
VERSION: stringNamespaces (7)
ContextMenuCellVerticalAlignmentnamespaceSource ↗
declare namespace ContextMenuCellVerticalAlignment| Member | Type | Summary |
|---|---|---|
| docxRow | "table.cellVerticalAlignment" |
ContextMenuPastenamespaceSource ↗
declare namespace ContextMenuPaste| Member | Type | Summary |
|---|---|---|
| docxRow | "edit.paste" |
ContextMenuPasteWithoutFormattingnamespaceSource ↗
declare namespace ContextMenuPasteWithoutFormatting| Member | Type | Summary |
|---|---|---|
| docxRow | "edit.pasteWithoutFormatting" |
ImageAltTextnamespaceSource ↗
declare namespace ImageAltText| Member | Type | Summary |
|---|---|---|
| docxSlot | "image.altText" |
ImageInsertTriggernamespaceSource ↗
declare namespace ImageInsertTrigger| Member | Type | Summary |
|---|---|---|
| docxSlot | "image.insert" |
ImagePropertiesTriggernamespaceSource ↗
declare namespace ImagePropertiesTrigger| Member | Type | Summary |
|---|---|---|
| docxSlot | "image.properties" |
ImageWrapnamespaceSource ↗
declare namespace ImageWrap| Member | Type | Summary |
|---|---|---|
| docxSlot | "image.wrap" |