@pptx-editor. dev/ react
v0.3.1 · 1 published subpath with full TypeScript signatures and JSDoc.
Package root
@pptx-editor.dev/react, the React adapter for PPTX Editor. PptxEditor.Root owns the engine instance, .Viewport scopes the styles, and .Content attaches the slide surface. Every piece of chrome is a hook consumer, and the toolbar derives from the engine's CHROME_GROUPS.
Functions (102)
ContextMenufunctionSource ↗
A context menu at a point. Closed by Escape (focus returns to where it was), Tab, a click outside, or a window resize. The arrow keys, Home, and End move through the rows.
declare function ContextMenu(input: ContextMenuProps): react.ReactPortal;definePopupfunctionSource ↗
Register an ordinary component in the popups map while keeping its props and hooks. Define the component outside the parent render function to keep its state across renders.
declare function definePopup<Props extends object>(component: ComponentType<Props>, options?: DefinePopupOptions): (props: Props) => ReactNode;```tsx
function AcmePageSetup({ open, onClose }: PageSetupDialogProps) {
return open ? <AcmeDialog title="Slide size" onDismiss={onClose} /> : null;
}
<PptxEditor.Root popups={{ pageSetup: definePopup(AcmePageSetup) }}>…</PptxEditor.Root>
```EditNoticefunctionSource ↗
Why the last edit was refused, or what the last Delete removed with an Undo action. Renders nothing while edits apply, and nothing for a command that had nothing to do (EditorRejection.noop).
EditNotice: (props: EditNoticeProps) => ReactNodeFillControlfunctionSource ↗
Fill color: one menu with the theme and standard colors, Transparent, gradient presets from the theme colors, a custom gradient dialog, a pattern dialog, and a picture.
declare function FillControl(input: FillControlProps): react.JSX.Element;FindBarfunctionSource ↗
The find and replace bar. Render one inside the editor's viewport, over the canvas.
FindBar: (props: FindBarProps) => ReactNodeFontNoticefunctionSource ↗
The substitution notice. Renders nothing when every font is available.
FontNotice: (props: FontNoticeProps) => ReactNodeGradientDialogfunctionSource ↗
The custom gradient dialog: type, angle, stops, rotation, and a preview.
declare function GradientDialog(input: GradientDialogProps): react.JSX.Element;HyperlinkPopupfunctionSource ↗
The packaged link popup: PptxEditor.HyperLink with its default parts. A popups.hyperlink renderer can forward its props to it, or render PptxEditor.HyperLink with its own parts.
declare function HyperlinkPopup(props: HyperlinkPopupProps): ReactNode;IconfunctionSource ↗
An inline Material Symbol.
declare function Icon(input: IconProps): react.JSX.Element;LayoutGalleryfunctionSource ↗
A grid of the deck's layouts, as the Layout and New Slide galleries show them: one group per slide master, headed by its name, and each tile the engine's render of a new slide on the layout, named below. The tiles are menu rows (menuitem, or menuitemradio with value); arrow keys, Home, and End move between them, so the gallery works in any menu or popup of the host.
declare function LayoutGallery(input: LayoutGalleryProps): react.JSX.Element;LineGlyphfunctionSource ↗
Glyphs for line kinds, line ends, and preset dashes, drawn in a 48×24 box.
declare function LineGlyph(input: LineGlyphProps): react.JSX.Element;LineMenuControlfunctionSource ↗
The line tool, the line start and end menus, and the dash menus, with each option drawn.
declare function LineMenuControl(input: LineMenuControlProps): react.JSX.Element | null;LoadingSpinnerfunctionSource ↗
The packaged spinner on its own, to compose into custom children. It is decorative (aria-hidden), so give the surrounding screen its own text.
declare function LoadingSpinner(input: LoadingSpinnerProps): react.JSX.Element;MenuEntryfunctionSource ↗
One menu of the bar. Inside PptxEditor.Menu it is a description the bar reads; the bar renders it.
declare function MenuEntry(_props: MenuEntryProps): ReactNode;MenuGroupfunctionSource ↗
A labeled set of rows inside a menu.
declare function MenuGroup(input: MenuGroupProps): react.JSX.Element | null;MenuRowfunctionSource ↗
A menu row: icon, label, and shortcut. A disabled row stays focusable with aria-disabled, so a keyboard or pointer user can read why.
declare function MenuRow(props: MenuRowProps): react.JSX.Element;MenuSeparatorfunctionSource ↗
A line between groups of rows.
declare function MenuSeparator(): react.JSX.Element;MenuSlotItemfunctionSource ↗
A menu row for a registered slot: its label, icon, shortcut, enabled state, and action come from the chrome registry. A slot that collects a value opens a submenu of its choices.
declare function MenuSlotItem(props: MenuSlotItemProps): ReactNode;MenuSubmenufunctionSource ↗
A row that opens a cascading panel to its right (to its left at the window's edge). It opens on hover, click, Enter, and ArrowRight, and closes on ArrowLeft and Escape, which give focus back to the row.
declare function MenuSubmenu(props: MenuSubmenuProps): react.JSX.Element;MenuTableGridfunctionSource ↗
The Insert Table grid, 10 columns by 8 rows, as DOCX Editor's TableSizeGrid: the cell under the pointer (or focus) picks the size and each cell names it. A grid with one tab stop; the arrows, Home, and End move inside it. The insert puts the caret in the new table's first cell, and the editor takes the focus.
declare function MenuTableGrid(input: MenuTableGridProps): react.JSX.Element;NotesPanefunctionSource ↗
Collapsible speaker notes for the current slide. The text shown is the document's; only the text typed since the field took focus is held here, bound to the slide it was typed on. It is written to that slide (wherever the slide is now) when the field loses focus, when the pointer goes down anywhere else, when the current slide changes, and before a format or an undo.
declare function NotesPane(props?: NotesPaneProps): react.JSX.Element | null;OpenFailurefunctionSource ↗
A notice that explains why a file did not open, and says when the deck that was open stays open. It shows nothing until the editor refuses a file, and shows again for each later refusal. <PptxEditor> renders it by default; compose it yourself inside a positioned box in a PptxEditor.Root:
tsx
<PptxEditor.OpenFailure
actions={({ failure }) => (
<a className="pptx-open-failure__action" href={/support?code=${failure.code}}>
Get help
</a>
)}
/>
For a toast or a banner of your own, use useOpenFailure.
OpenFailure: (props: PptxEditorOpenFailureProps) => ReactNodePatternDialogfunctionSource ↗
The pattern fill dialog: a preset, its two colors, and a preview.
declare function PatternDialog(input: PatternDialogProps): react.JSX.Element;PptxEditorContentfunctionSource ↗
The slide canvas: attaches the engine surface in a layout effect. Right-click, Shift+F10, and the Menu key open its context menu.
declare function PptxEditorContent(input: PptxEditorContentProps): react.JSX.Element;PptxEditorViewportfunctionSource ↗
The editor's scroll and styling scope: carries the .pptx-editor class, and dark with it when the root's colorMode resolves to dark. It is a named landmark region ("Presentation editor"), so a screen reader user can go to the editor from anywhere on the page.
declare function PptxEditorViewport(input: PptxEditorViewportProps): react.JSX.Element;RailContextMenufunctionSource ↗
The slide rail's context menu: new, duplicate, delete, and move slides, background, and present from here. Rows act on every selected slide.
declare function RailContextMenu(input: RailContextMenuProps): react.JSX.Element;rejectionMessagefunctionSource ↗
The message for a refusal: its reason, with the detail where the reason names one.
declare function rejectionMessage(t: Translate, rejection: EditorRejection): string;requestFindBarfunctionSource ↗
Open the find bar of editor: to find, or with the replace row when replace.
declare function requestFindBar(editor: PptxEditorInstance | null, replace?: boolean): void;requestSectionRenamefunctionSource ↗
Ask the slide rail or the slide sorter of editor to start renaming section sectionId in place, as Home Section Rename Section does: what the section.rename slot runs. Use it when you build your own section chrome. When neither is mounted, nothing opens and a development warning says so.
declare function requestSectionRename(editor: PptxEditorInstance | null, sectionId: string): void;RibbonTabfunctionSource ↗
One tab of the ribbon. Inside PptxEditor.Ribbon it is a description the ribbon reads.
declare function RibbonTab(_props: RibbonTabProps): ReactNode;SectionContextMenufunctionSource ↗
The section menu: Rename, Remove, Remove with slides, Remove all, Move up and down, Collapse and Expand all. Every row asks the engine whether it can run.
declare function SectionContextMenu(input: SectionContextMenuProps): react.JSX.Element;SelectionPanefunctionSource ↗
The selection pane: select, show or hide, rename, and reorder the elements of the current slide. Render it inside the editor root, or open the side panel's **Selection** tab.
declare function SelectionPane(props?: SelectionPaneProps): react.JSX.Element;ShapeGalleryControlfunctionSource ↗
The insert-shape gallery: every category, every preset as its own preview.
declare function ShapeGalleryControl(input: ShapeGalleryControlProps): react.JSX.Element;ShapeGridfunctionSource ↗
One gallery category's presets as a grid of previews drawn from their spec geometry. Each preview is a menuitem; the arrow keys move by grid rows (data-columns).
declare function ShapeGrid(input: ShapeGridProps): react.JSX.Element;ShapeIconfunctionSource ↗
A preset's preview, drawn from its spec geometry.
declare function ShapeIcon(input: ShapeIconProps): react.JSX.Element | null;ShapeStyleGalleryfunctionSource ↗
The Quick Styles gallery: six theme style rows of seven colors, drawn with the current slide's theme. Put it in a popover or a menu.
declare function ShapeStyleGallery(input: ShapeStyleGalleryProps): ReactNode;SidePanelfunctionSource ↗
The side panel: Format · Chart Data · Diagram · Selection · Animations · Comments. panes fills a tab.
declare function SidePanel(input: SidePanelProps): react.JSX.Element;SlideRailAddSlidefunctionSource ↗
Add slide, after the current slide.
declare function SlideRailAddSlide(props: SlideRailPartProps): ReactNode;SlideRailChooseLayoutfunctionSource ↗
The layout gallery: adds a slide with the layout the person picks.
declare function SlideRailChooseLayout(props: SlideRailPartProps): ReactNode;SlideRailCollapsefunctionSource ↗
Hide thumbnails: folds the rail to a narrow strip. toggle={false} on the rail removes it.
declare function SlideRailCollapse(props: SlideRailPartProps): ReactNode;SlideRailDeletefunctionSource ↗
Delete the selected slides. The last slide stays.
declare function SlideRailDelete(props: SlideRailPartProps): ReactNode;SlideRailDuplicatefunctionSource ↗
Duplicate the selected slides.
declare function SlideRailDuplicate(props: SlideRailPartProps): ReactNode;SlideRailExpandfunctionSource ↗
Show thumbnails: the one button of the folded rail strip, which opens the rail again. A child of SlideRail replaces it in place; hidden leaves the strip with no button. toggle={false} on the rail removes it.
declare function SlideRailExpand(props: SlideRailPartProps): ReactNode;SlideRailMoveEarlierfunctionSource ↗
Move the selected slides one place earlier (up, or left in a horizontal rail).
declare function SlideRailMoveEarlier(props: SlideRailPartProps): ReactNode;SlideRailMoveLaterfunctionSource ↗
Move the selected slides one place later (down, or right in a horizontal rail).
declare function SlideRailMoveLater(props: SlideRailPartProps): ReactNode;SlideshowfunctionSource ↗
The slide show of the editor in PptxEditor.Root. Mount it once inside the viewport. It shows nothing until a show starts: useSlideshow().start(...), or the keys F5 (from the start) and Shift+F5 or Ctrl/Cmd+Enter (from the current slide).
declare function Slideshow(): react.JSX.Element;SlideSorterfunctionSource ↗
The slide sorter. Put it where the slide and the rail go in the Normal view, while snapshot().presentationView is slideSorter. When the view becomes slideSorter and no sorter of the editor is mounted, a development warning says so.
declare function SlideSorter(input?: SlideSorterProps): react.JSX.Element;StatusBarNotesfunctionSource ↗
The Notes button: shows or hides the speaker notes (useNotesPane).
declare function StatusBarNotes(input: StatusBarNotesProps): ReactNode;StatusBarSlideNumberfunctionSource ↗
"Slide 2 of 5".
declare function StatusBarSlideNumber(input: StatusBarPartProps): ReactNode;StatusBarViewsfunctionSource ↗
The view buttons: the editor's view switch (view.presentationView: Normal and Slide Sorter), the same control as the default editor's status area.
declare function StatusBarViews(input: StatusBarPartProps): ReactNode;StatusBarZoomfunctionSource ↗
Zoom out, the zoom level with its menu, and zoom in: the editor's ZoomPill.
declare function StatusBarZoom(input: StatusBarPartProps): ReactNode;ToolbarActionfunctionSource ↗
A host-owned toolbar action, styled and behaved like the packaged controls. Put it in a Toolbar.Group so it collapses into the More menu with its group. A direct child of a preset toolbar goes after the groups and never collapses, as in DOCX Editor. Without an icon or children, it shows its label as text.
declare function ToolbarAction(props: ToolbarActionProps): ReactNode;```tsx
<PptxEditor.Toolbar>
<PptxEditor.Toolbar.Group id="review" label="Review" priority={15}>
<PptxEditor.Toolbar.Action label="Send for review" icon={<SendIcon />} onSelect={send} />
</PptxEditor.Toolbar.Group>
</PptxEditor.Toolbar>
```ToolbarControlfunctionSource ↗
One control, by registry shape.
declare function ToolbarControl(input: ToolbarControlProps): react.JSX.Element;ToolbarGroupfunctionSource ↗
A group of controls. Inside a Toolbar with the preset on, a built-in id changes that group and any other id adds a host group; with preset={false}, it renders its children. A host group's accessible name is its label, else its translated labelKey, else its id.
declare function ToolbarGroup(props: ToolbarGroupProps): ReactNode;```tsx
<PptxEditor.Toolbar>
<PptxEditor.Toolbar.Group id="acme" label="Acme">
<button type="button" onClick={askLegal}>Ask legal</button>
</PptxEditor.Toolbar.Group>
<PptxEditor.Toolbar.Group id="find" hidden />
</PptxEditor.Toolbar>
```ToolbarSeparatorfunctionSource ↗
A vertical rule between controls, for a preset={false} toolbar.
declare function ToolbarSeparator(input: ToolbarSeparatorProps): ReactNode;ToolbarSlotfunctionSource ↗
One registered control. Inside a Toolbar with the preset on, it declares an override; anywhere else (preset={false}, a group) it renders the control.
declare function ToolbarSlot(props: ToolbarSlotProps): ReactNode;```tsx
<PptxEditor.Toolbar>
<PptxEditor.Toolbar.Slot slotId="text.bold" icon={<BoldIcon />} className="acme-bold" />
<PptxEditor.Toolbar.Slot slotId="history.undo" asChild>
<AcmeButton>Undo</AcmeButton>
</PptxEditor.Toolbar.Slot>
<PptxEditor.Toolbar.Slot slotId="text.strike" hidden />
</PptxEditor.Toolbar>
```translatorForfunctionSource ↗
Build a translator for a locale catalog.
declare function translatorFor(locale?: LocaleCatalog): Translate;useBackgroundDialogfunctionSource ↗
Read the draft of the enclosing Background dialog, for a host's own field inside it. It does not open the dialog: useEditorDialog('background').open() does.
declare function useBackgroundDialog(): UseBackgroundDialogReturn;useBulletFormatfunctionSource ↗
The bullet format of the selected paragraphs, and the command to change it. apply sends one setBulletFormat, so a dialog's worth of changes is one undo step.
declare function useBulletFormat(): UseBulletFormatReturn;```tsx
function Bigger() {
const { isEnabled, apply } = useBulletFormat();
return <button disabled={!isEnabled} onClick={() => apply({ sizePercent: 150 })}>Bigger bullets</button>;
}
```useBulletsAndNumberingDialogfunctionSource ↗
Read the draft of the enclosing Bullets and Numbering dialog, for a host's own field inside it. It does not open the dialog: useEditorDialog('bulletsAndNumbering').open() does.
declare function useBulletsAndNumberingDialog(): UseBulletsAndNumberingDialogReturn;useChromeTranslatefunctionSource ↗
The chrome's translation function, as DOCX Editor's useChromeTranslate: the t of the nearest compound that takes one, else the root's locale. overrides wins for the keys it holds. Use it for the labels of your own parts, so they follow the same language.
declare function useChromeTranslate(overrides?: ReadonlyMap<string, string>): ChromeTranslate;```tsx
const t = useChromeTranslate();
<PptxEditor.Toolbar.Action label={t('toolbar.save')} onSelect={save} />
```useColumnsDialogfunctionSource ↗
Read the draft of the enclosing Columns dialog, for a host's own field inside it. It does not open the dialog: useEditorDialog('columns').open() does.
declare function useColumnsDialog(): UseColumnsDialogReturn;useContextMenuRequestfunctionSource ↗
The open canvas context menu, for a host's own rows: what it opened on, where, and how to close it. Null outside an open menu.
declare function useContextMenuRequest(): ContextMenuRequest | null;useContextMenuTargetfunctionSource ↗
The element the open context menu opened on (the slide canvas), or null while no menu is open. The same hook as DOCX Editor's.
declare function useContextMenuTarget(): HTMLElement | null;useDocumentSearchfunctionSource ↗
The editor's find session with no UI, for your own find bar, as DOCX Editor's useDocumentSearch. Every hook on one editor shares the session. Outside a root, it has no matches and every action does nothing.
declare function useDocumentSearch(): UseDocumentSearchResult;useEditorCaretfunctionSource ↗
The caret, as DOCX Editor's useEditorCaret: the text box, paragraph, and offset, or null when no text is being edited. Compared by value, so a consumer re-renders only when the caret moves.
declare function useEditorCaret(): EditorCaret | null;useEditorColorModefunctionSource ↗
The theme the enclosing PptxEditor.Root resolved from its colorMode, so parts you build yourself (a portaled popover) can match the chrome. 'system' follows the operating system and re-renders when it changes. Outside a root, or without colorMode, it is 'light'. The same hook as DOCX Editor's.
declare function useEditorColorMode(): UseEditorColorModeReturn;```tsx
function MyPanel() {
const { colorMode } = useEditorColorMode();
return <aside className={colorMode === 'dark' ? 'panel panel--dark' : 'panel'} />;
}
```useEditorCommandfunctionSource ↗
State and execution for one ChromeSlotId. A slot the adapter runs (a dialog, the link popup, find, the slide show) runs through PptxEditor.Root, as a menu row does; outside a root it is disabled with the reason. useEditorCommand('text.link').execute(url) sets the link (null removes it) with or without the popup. While the speaker notes field has the cursor, text.bold, text.italic, text.underline, and text.strike format the notes text. execute takes any value, so a host can pass a registry option's value; useEditorValueCommand types it.
declare function useEditorCommand(slot: ChromeSlotId): UseEditorCommandReturn;useEditorDialogfunctionSource ↗
Open, close, and read one of the editor's dialogs. The packaged openers use the same call, so a host renderer in popups receives every request. Outside PptxEditor.Root it reports the dialog as unavailable. It takes the dialog's key; the per-dialog hooks (usePageSetupDialog, useBackgroundDialog, useParagraphDialog, useFontDialog, useBulletsAndNumberingDialog, useColumnsDialog) read an open dialog's draft, as in DOCX Editor.
declare function useEditorDialog(key: PptxEditorDialogKey): UseEditorDialogReturn;```tsx
function PageSetupButton() {
const pageSetup = useEditorDialog('pageSetup');
if (!pageSetup.isAvailable) return null;
return <button onClick={() => pageSetup.open()}>Page setup</button>;
}
```useEditorEventfunctionSource ↗
Subscribe to an editor event ('change', 'selectionChange', 'rejection', 'openFailure') for the lifetime of the component, as DOCX Editor's useEditorEvent. It does nothing until the nearest PptxEditor.Root creates the editor, and subscribes again when the instance changes. A new handler on each render does not subscribe again; the latest one is called.
declare function useEditorEvent<E extends keyof PptxEditorEvents>(event: E, handler: PptxEditorEvents[E]): void;```tsx
useEditorEvent('rejection', (rejection) => toast(rejection.reason));
```useEditorHostDocumentfunctionSource ↗
The document that the editor's slide is mounted in, as DOCX Editor's useEditorHostDocument: an iframe's when the host mounted the editor there, else the page's own. Null during server rendering. Your own chrome that adds document listeners, reads focus, or adds a <style> uses it in place of the global document. Its defaultView is the editor's window.
declare function useEditorHostDocument(): UseEditorHostDocumentReturn;```tsx
const hostDocument = useEditorHostDocument();
useEffect(() => {
if (!hostDocument) return;
hostDocument.addEventListener('keydown', onShortcut);
return () => hostDocument.removeEventListener('keydown', onShortcut);
}, [hostDocument]);
```useEditorSnapshotfunctionSource ↗
Re-render the caller each time editor publishes a change, as DOCX Editor's useEditorSnapshot. Returns a counter that changes on each change, so it also serves as a dependency. Prefer useEditorState with a selector: it re-renders only when its slice changes.
declare function useEditorSnapshot(editor: PptxEditorInstance | null): number;useEditorStatefunctionSource ↗
Subscribe to a slice of editor state. Re-renders only when isEqual says the slice changed (default Object.is).
declare function useEditorState<T>(selector: (snapshot: EditorSnapshot) => T, isEqual?: (a: T, b: T) => boolean): T;useEditorValueCommandfunctionSource ↗
State and execution for one typed value slot: execute takes the slot's ToolbarValueMap type, so a typo in a value does not compile, and returns the engine's result.
declare function useEditorValueCommand<K extends keyof ToolbarValueMap>(slot: K): UseEditorValueCommandReturn<ToolbarValueMap[K], ToolbarShownValue<K>>;useEquationDialogfunctionSource ↗
Read the draft of the enclosing Equation dialog, for a host's own field inside it. It does not open the dialog: useEditorDialog('equation').open() does.
declare function useEquationDialog(): UseEquationDialogReturn;useFontDialogfunctionSource ↗
Read the draft of the enclosing Font dialog, for a host's own field inside it. It does not open the dialog: useEditorDialog('font').open() does.
declare function useFontDialog(): UseFontDialogReturn;useFontFamilyfunctionSource ↗
The font family picker's behavior, with no UI, as DOCX Editor's useFontFamily.
declare function useFontFamily(): UseFontFamilyReturn;```tsx
function FamilyList() {
const { groups, setValue, isCurrent, isEnabled } = useFontFamily();
return groups.flatMap((group) =>
group.rows.map((row) => (
<button key={row.value} disabled={!isEnabled || row.disabled} aria-pressed={isCurrent(row)}
onClick={() => setValue(row.value)}>{row.family}</button>
))
);
}
```useFontFormatfunctionSource ↗
The font of the selected text (or of every run of the selected shapes), and the command to change it. apply sends one setFontFormat, so a dialog's worth of changes is one undo step.
declare function useFontFormat(): UseFontFormatReturn;```tsx
function Loose() {
const { isEnabled, apply } = useFontFormat();
return <button disabled={!isEnabled} onClick={() => apply({ characterSpacingPt: 3 })}>Loose</button>;
}
```useFontsfunctionSource ↗
Merge font origins into one stable value for PptxEditor.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 <PptxEditor.Root fonts={fonts}>{children}</PptxEditor.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 the fonts option of createPptxEditor without being mistaken for a zero-argument loader.
declare function useFonts(source: FontsInput, ...fragments: readonly (FontConfigurationFragment | undefined)[]): UseFontsReturn;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[]): UseFontsReturn;useHistoryGroupfunctionSource ↗
One undo step for one gesture on your own control, as DOCX Editor's useHistoryGroup. Bind the control with ref, and pass options() to each command that the gesture runs. A drag, a held key, or a color pick is then one step of editor.exec({ type: 'undo' }).
declare function useHistoryGroup(input: HistoryGroupBindingOptions): UseHistoryGroupReturn;```tsx
const group = useHistoryGroup({ kind: 'range' });
const size = useEditorValueCommand('font.size');
<input type="range" ref={group.ref} onChange={(e) => size.execute(+e.target.value, group.options())} />
```useHyperlinkPopupfunctionSource ↗
The link popup's behavior, for your own link UI, as DOCX Editor's useHyperlinkPopup.
Inside PptxEditor.Root it is the shared state that the packaged popup shows, so your panel, the toolbar's link control, Insert Link, and Ctrl/Cmd+K agree. With popups.hyperlink: false, the link controls open your panel while it is mounted. Outside a root it is a standalone instance, as useHyperlinkPopupInstance().
declare function useHyperlinkPopup(): UseHyperlinkPopupResult;```tsx
function LinkPanel() {
const { state, setUrl, commitEdit, close } = useHyperlinkPopup();
if (state.mode === 'closed') return null;
return (
<form onSubmit={(e) => { e.preventDefault(); commitEdit(); }}>
<input value={state.draft} onChange={(e) => setUrl(e.target.value)} />
<button type="button" onClick={close}>Cancel</button>
</form>
);
}
```useHyperlinkPopupInstancefunctionSource ↗
A link popup of its own, as DOCX Editor's useHyperlinkPopupInstance. While active, it opens for the link requests of the editor. Inside a root, prefer useHyperlinkPopup(): the root's own popup also answers the requests.
declare function useHyperlinkPopupInstance(active?: boolean): UseHyperlinkPopupResult;useImageAltTextDialogfunctionSource ↗
Read the draft of the enclosing Alt Text dialog, for a host's own field inside it. It does not open the dialog: useEditorDialog('imageAltText').open() does.
declare function useImageAltTextDialog(): UseImageAltTextDialogReturn;useImagePropertiesDialogfunctionSource ↗
Read the draft of the enclosing Format Picture dialog, for a host's own field inside it. It does not open the dialog: useEditorDialog('imageProperties').open() does.
declare function useImagePropertiesDialog(): UseImagePropertiesDialogReturn;useNotesPanefunctionSource ↗
The open state of the speaker notes that PptxEditor.NotesPane shows, after DOCX Editor's useNavigationPane. Use it to build a notes toggle of your own. Outside PptxEditor.Root it warns and does nothing.
declare function useNotesPane(): UseNotesPaneReturn;useOpenFailurefunctionSource ↗
Reads the file 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 <PptxEditor>, so the packaged notice does not show as well. Call it inside a PptxEditor.Root.
declare function useOpenFailure(options?: UseOpenFailureOptions): UseOpenFailureReturn;usePageSetupDialogfunctionSource ↗
Read the draft of the enclosing Page setup dialog, for a host's own field inside it. It does not open the dialog: useEditorDialog('pageSetup').open() does.
declare function usePageSetupDialog(): UsePageSetupDialogReturn;useParagraphDialogfunctionSource ↗
Read the draft of the enclosing Paragraph dialog, for a host's own field inside it. It does not open the dialog: useEditorDialog('paragraph').open() does.
declare function useParagraphDialog(): UseParagraphDialogReturn;useParagraphFormatfunctionSource ↗
The selection's paragraph formatting, and the command to change it. apply sends one setParagraphFormat, so a dialog's worth of changes is one undo step.
declare function useParagraphFormat(): UseParagraphFormatReturn;```tsx
function SpaceAfterButton() {
const { isEnabled, apply } = useParagraphFormat();
return <button disabled={!isEnabled} onClick={() => apply({ spaceAfterPt: 12 })}>12 pt after</button>;
}
```usePptxEditorfunctionSource ↗
The editor instance, or null before it mounts. Outside PptxEditor.Root it is always null, and a development warning says so, as for the other parts.
declare function usePptxEditor(): PptxEditorInstance | null;usePptxSourcefunctionSource ↗
Load a presentation, and optionally its fonts, for PptxEditor, as DOCX Editor's useDocxSource.
tsx
const { document, fonts, error } = usePptxSource(url, { fonts: packagedFonts() });
if (error) return <p>{error.message}</p>;
return <PptxEditor document={document} fonts={fonts} />;
Eager fonts (a value, a promise, or a zero-argument loader) hold the deck back until they settle, so the slides lay out once. They hold it for at most 2 seconds: fonts that settle later apply, and the slides lay out again. An on-demand resolver (packagedFonts(), googleFonts()) needs the parsed deck, so the bytes go through at once and the slides lay out again when the faces arrive. A font failure never fails the deck.
A URL is fetched with the browser's fetch, as written. Check a URL from user input first. A URL that sends no bytes for 10 seconds fails with an error, and a slow download that keeps sending bytes finishes.
declare function usePptxSource(source: PptxSource | null | undefined, options?: UsePptxSourceOptions): UsePptxSourceResult;useReviewAuthorsfunctionSource ↗
The review authors of the open deck, in slot order (getReviewAuthors): every comment author by first appearance, then the author of new comments, each with the color the comment markers, the text bands, and the comments pane draw them in. Renders again only when a slot changes. Use it for a legend or for your own comment UI.
tsx
const authors = useReviewAuthors();
authors.map(({ author, color }) => (
<li key={author} style={{ borderColor: color }}>{author}</li>
));
declare function useReviewAuthors(): readonly ReviewAuthorInfo[];useScopeClassNamefunctionSource ↗
The scope classes a part you build yourself adds to its own root element, so the editor's --doc-* tokens and chrome styles apply to it, as DOCX Editor's useScopeClassName. Inside PptxEditor.Viewport it is '': the viewport already carries the scope. Outside it, it is 'pptx-editor ', or 'pptx-editor dark ' when the root's colorMode resolved dark. A part that portals out of the viewport (to document.body) adds pptx-editor itself, with useEditorColorMode for the theme.
The value ends with a space, so it concatenates cleanly, and '' collapses away.
declare function useScopeClassName(): '' | 'pptx-editor ' | 'pptx-editor dark ';```tsx
const scope = useScopeClassName();
<aside className={`${scope}my-panel`} />
```useSlideLayoutsfunctionSource ↗
The deck's slide layouts (EditorSnapshot.layouts), in the order the galleries list them, reference-stable while they do not change. For a host's own layout picker.
declare function useSlideLayouts(): readonly SlideLayoutSummary[];useSlideshowfunctionSource ↗
The slide show of the editor in PptxEditor.Root.
declare function useSlideshow(): UseSlideshowReturn;useToolbarContextfunctionSource ↗
The nearest compound's published value, as DOCX Editor's useToolbarContext.
declare function useToolbarContext(): ToolbarContextValue;useToolbarLabelfunctionSource ↗
The label for a key: the nearest compound's t, else the locale catalog.
declare function useToolbarLabel(): (key: string) => string;useToolbarLabelForfunctionSource ↗
The label for a key, given a host resolver: the host's translation, else the locale catalog, as DOCX Editor's useToolbarLabelFor.
declare function useToolbarLabelFor(t: ChromeTranslate | undefined): (key: string) => string;useTranslationfunctionSource ↗
The translator, with shortcut text for this platform.
declare function useTranslation(): {
t: Translate;
};useZoomfunctionSource ↗
Read and set the slide zoom, as DOCX Editor's useZoom. Outside PptxEditor.Root, and before the editor mounts, it reports 100 % and every action does nothing, so a control can render unconditionally.
declare function useZoom(): UseZoomResult;```tsx
const { zoom, isFit, fit, zoomIn, canZoomIn } = useZoom();
<button onClick={fit} aria-pressed={isFit}>Fit</button>
<button onClick={zoomIn} disabled={!canZoomIn}>+</button>
<span>{Math.round(zoom * 100)}%</span>
```ZoomPillfunctionSource ↗
The zoom pill (– 100% ▾ +).
declare function ZoomPill(input?: ZoomPillProps): react.JSX.Element;Interfaces (121)
BackgroundDialogFieldsinterfaceSource ↗
The draft of the Background dialog. background is the fill OK applies: a fill, null for the layout's background, or undefined to keep the slide's own fill.
interface BackgroundDialogFields| Member | Type | Summary |
|---|---|---|
| allSlides | boolean | Apply the fill to every slide. |
| background | SlideBackground | null | undefined | The fill OK applies: a fill, `null` for the layout's background, `undefined` to keep the slide's own. |
BackgroundDialogPropsinterfaceSource ↗
Props for PptxEditor.BackgroundDialog.
interface BackgroundDialogProps extends DialogCustomizationProps| Member | Type | Summary |
|---|---|---|
| onClose | () => void | Called on Cancel, Escape, a click on the backdrop, and after OK. |
| open | boolean | Whether the dialog is shown. The host owns this state. |
BulletsAndNumberingDialogPropsinterfaceSource ↗
Props for PptxEditor.BulletsAndNumberingDialog.
interface BulletsAndNumberingDialogProps extends DialogCustomizationProps| Member | Type | Summary |
|---|---|---|
| onClose | () => void | Called on Cancel, Escape, a click on the backdrop, and after OK applies. |
| open | boolean | Whether the dialog is shown. The host owns this state. |
ColumnsDialogPropsinterfaceSource ↗
Props for PptxEditor.ColumnsDialog.
interface ColumnsDialogProps extends DialogCustomizationProps| Member | Type | Summary |
|---|---|---|
| onClose | () => void | Called on Cancel, Escape, a click on the backdrop, and after OK applies. |
| open | boolean | Whether the dialog is shown. The host owns this state. |
ContextMenuNamespaceinterfaceSource ↗
The canvas context menu with its parts attached as statics.
interface ContextMenuNamespace extends ContextMenuNamedRows| Member | Type | Summary |
|---|---|---|
| (member-0) | | The canvas context menu, for the target that opened it. See `PptxEditorContextMenuProps`. |
| Group | typeof MenuGroup | A labeled set of rows. |
| Item | typeof MenuRow | A host row: label, icon, shortcut, and an action. |
| Separator | typeof MenuSeparator | A line between rows. |
| Slot | typeof MenuSlotItem | A row for a registered slot; replaces or hides the built-in row of the same slot. |
| Submenu | typeof MenuSubmenu | A row that opens a nested panel. |
ContextMenuPointinterfaceSource ↗
A point in client (viewport) pixels.
interface ContextMenuPoint| Member | Type | Summary |
|---|---|---|
| x | number | The horizontal position in CSS pixels from the left of the window. |
| y | number | The vertical position in CSS pixels from the top of the window. |
ContextMenuPropsinterfaceSource ↗
Props of ContextMenu.
interface ContextMenuProps| Member | Type | Summary |
|---|---|---|
| at | ContextMenuPoint | Where the menu opens: the pointer, or the focused element for a keyboard open. |
| children | ReactNode | The menu's rows. |
| className? | string | A class name added to the menu. |
| keyboard? | boolean | Opened from the keyboard (Shift+F10, the Menu key): focus goes to the first row. |
| label | string | The accessible name of the menu. |
| onClose | () => void | Called when the menu closes: a row ran, Escape, Tab, or a click outside. |
| owner? | HTMLElement | null | The element the menu opened on; its editor scope carries the theme tokens. |
ContextMenuRequestinterfaceSource ↗
What a canvas context menu opened on, and where.
interface ContextMenuRequest| Member | Type | Summary |
|---|---|---|
| at | ContextMenuPoint | Where the menu opens, in client pixels. |
| close | () => void | Close the menu. |
| keyboard | boolean | Opened from the keyboard: focus goes to the first row. |
| kind | CanvasMenuKind | Shapes, pictures only (`picture`, the picture menu), text being edited, or empty slide area. A selection of pictures only reports `picture`, not `shapes`. |
| owner | HTMLElement | The canvas element the menu opened on. |
DefinePopupOptionsinterfaceSource ↗
Options of definePopup.
interface DefinePopupOptions| Member | Type | Summary |
|---|---|---|
| reading? | boolean | For `popups.hyperlink`: the renderer shows reading mode too, so a click into linked text opens it with `mode: 'reading'`. Without it a renderer opens for the URL field alone. |
DialogCustomizationPropsinterfaceSource ↗
Layout customization for a packaged dialog.
interface DialogCustomizationProps| Member | Type | Summary |
|---|---|---|
| children? | ReactNode | Named parts that replace the defaults, or the whole arrangement with `preset={false}`. |
| className? | string | A class name added to the dialog surface. |
| preset? | boolean | `true` (default): the default arrangement, with named children replacing their parts in place and other children appended. `false`: only the children. |
| style? | CSSProperties | Styles added to the dialog surface. |
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-pptx-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 | The accessible name of the part's element. |
| (member-1) | | `data-*` attributes, passed to the part's element. |
| asChild? | boolean | Apply the part's wiring to the single child element. |
| children? | ReactNode | Content in place of the part's default content. |
| className? | string | A class name added to the part's element. |
| id? | string | The id of the part's element. |
| style? | CSSProperties | Inline styles for the part's element. |
| title? | string | The tooltip of the part's element. |
EditNoticePropsinterfaceSource ↗
The props of EditNotice.
interface EditNoticeProps| Member | Type | Summary |
|---|---|---|
| className? | string | Appended after the `pptx-edit-notice` class. |
| t? | ChromeTranslate | Your translation function for the notice, as DOCX Editor's `t` on its notices. Without it, the root's `locale` gives the labels. |
EquationDialogFieldsinterfaceSource ↗
The draft of the Equation dialog.
interface EquationDialogFields| Member | Type | Summary |
|---|---|---|
| linear | string | The linear form of the equation, such as `x=(-b\pm\sqrt(b^2-4ac))/(2a)`. |
EquationDialogPropsinterfaceSource ↗
Props for PptxEditor.EquationDialog.
interface EquationDialogProps extends DialogCustomizationProps| Member | Type | Summary |
|---|---|---|
| onClose | () => void | Called on Cancel, Escape, a click on the backdrop, and after OK. |
| open | boolean | Whether the dialog is shown. The host owns this state. |
FillControlPropsinterfaceSource ↗
The props of FillControl.
interface FillControlProps| Member | Type | Summary |
|---|---|---|
| control | ChromeControl | The registry entry of the control, from `CHROME_GROUPS`. |
| slot | ChromeSlotId | The chrome slot the control runs. |
FindBarPropsinterfaceSource ↗
The props of FindBar.
interface FindBarProps| Member | Type | Summary |
|---|---|---|
| className? | string | Appended after the `pptx-find` class. |
| t? | ChromeTranslate | Your translation function for the bar, as DOCX Editor's `t` on its find pane. Without it, the root's `locale` gives the labels. |
FindPopupPropsinterfaceSource ↗
What a replacement find bar receives.
interface FindPopupProps| Member | Type | Summary |
|---|---|---|
| onClose | () => void | Close the bar. Run `editor.find` and `editor.replace` for the search itself. |
| replace | boolean | Opened to replace (Ctrl/Cmd+H), not only to find. |
FontDialogPropsinterfaceSource ↗
Props for PptxEditor.FontDialog.
interface FontDialogProps extends DialogCustomizationProps| Member | Type | Summary |
|---|---|---|
| onClose | () => void | Called on Cancel, Escape, a click on the backdrop, and after OK applies. |
| open | boolean | Whether the dialog is shown. The host owns this state. |
FontFamilyItemPropsinterfaceSource ↗
Props of Toolbar.FontFamily.Item.
interface FontFamilyItemProps extends FontFamilyPartProps| Member | Type | Summary |
|---|---|---|
| value | string | What the item applies: a family name, or a theme font reference (`+mj-lt` for the headings font, `+mn-lt` for the body font), so the text follows a later theme change. |
FontFamilyNamespaceinterfaceSource ↗
Toolbar.FontFamily: the font.family picker, as DOCX Editor's FontFamily compound. With no children it renders the default trigger and list; with children, compose the Trigger, Content, and Item parts around the shared state.
interface FontFamilyNamespace| Member | Type | Summary |
|---|---|---|
| (member-0) | | Changes, hides, or recomposes the font family picker. |
| Content | (props: FontFamilyPartProps) => ReactNode | The list, while it is open. |
| Item | (props: FontFamilyItemProps) => ReactNode | One option of the list. |
| pptxSlot | ChromeSlotId | The slot the part stands for. The toolbar reads it to place the part. |
| Trigger | (props: FontFamilyPartProps) => ReactNode | The button that opens the list. |
FontFamilyPartPropsinterfaceSource ↗
Props of Toolbar.FontFamily.Trigger and Toolbar.FontFamily.Content.
interface FontFamilyPartProps| Member | Type | Summary |
|---|---|---|
| children? | ReactNode | Content in place of the part's default content. |
| className? | string | A class name added to the part's element. |
FontFamilyPropsinterfaceSource ↗
Props of Toolbar.FontFamily: a picker part's className and hidden, and children that compose its Trigger, Content, and Item parts.
interface FontFamilyProps extends ToolbarSlotPartProps| Member | Type | Summary |
|---|---|---|
| children? | ReactNode | `Toolbar.FontFamily.Trigger` and `Toolbar.FontFamily.Content`, in place of the defaults. |
FontNoticePropsinterfaceSource ↗
The props of FontNotice.
interface FontNoticeProps| Member | Type | Summary |
|---|---|---|
| className? | string | Appended after the `pptx-font-notice` class. |
| t? | ChromeTranslate | Your translation function for the notice, as DOCX Editor's `t` on its font notice. Without it, the root's `locale` gives the labels. |
GradientDialogPropsinterfaceSource ↗
Props for PptxEditor.GradientDialog.
interface GradientDialogProps| Member | Type | Summary |
|---|---|---|
| initial | GradientFill | null | The gradient the dialog starts from. |
| onApply | (gradient: GradientFill) => void | Called with the gradient the person applied. |
| onClose | () => void | Called when the dialog closes, applied or not. |
| open | boolean | Whether the dialog shows. |
HyperLinkActionPropsinterfaceSource ↗
Props of the action parts, which also take an icon.
interface HyperLinkActionProps extends HyperLinkPartProps| Member | Type | Summary |
|---|---|---|
| icon? | ReactNode | The glyph; falls back to `children`, then to the part's default icon. |
HyperLinkNamespaceinterfaceSource ↗
The link popup compound.
interface HyperLinkNamespace| 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 |
HyperLinkPartPropsinterfaceSource ↗
Shared props of every part.
interface HyperLinkPartProps| Member | Type | Summary |
|---|---|---|
| asChild? | boolean | Put this part's wiring on the one child element instead of the default element. |
| children? | ReactNode | |
| className? | string |
HyperlinkPopupPropsinterfaceSource ↗
What a replacement link popup receives.
interface HyperlinkPopupProps| Member | Type | Summary |
|---|---|---|
| anchor | HTMLElement | null | The element the popup opens under: the toolbar's link button, else the element the request came from (the slide for Ctrl/Cmd+K, a menu row's opener). |
| className? | string | A class name added to the popup panel, for a host renderer that forwards these props. |
| mode? | 'reading' | 'editing' | `reading` after a click into linked text (the target, Copy, Edit, Unlink), `editing` for the URL field. Absent means `editing`. `useHyperlinkPopup()` gives the state and the actions. A renderer receives `reading` only when registered with `definePopup(C, { reading: true })`. |
| onClose | () => void | Close the popup. Apply the link with `editor.exec({ type: 'setLink', url })`. |
| url | string | The link of the selection now, or an empty string. |
HyperLinkPropsinterfaceSource ↗
Props of PptxEditor.HyperLink.
interface HyperLinkProps extends HyperLinkPartProps| Member | Type | Summary |
|---|---|---|
| preset? | boolean | Render the packaged parts. `false` renders only the panel and your children. |
IconPropsinterfaceSource ↗
The props of Icon.
interface IconProps| Member | Type | Summary |
|---|---|---|
| className? | string | The class of the `svg` element. Defaults to `pptx-icon`. |
| name? | string | A Material Symbol name from `ICON_PATHS`. |
| paths? | readonly string[] | null | SVG path data, in place of `name`. |
ImageAltTextDialogFieldsinterfaceSource ↗
The draft of the Alt Text dialog.
interface ImageAltTextDialogFields| Member | Type | Summary |
|---|---|---|
| decorative | boolean | Mark as decorative: a screen reader skips the element, and the description is dropped. |
| description | string | The description a screen reader reads (`p:cNvPr/@descr`). |
| title | string | The title (`p:cNvPr/@title`). |
ImageAltTextDialogPropsinterfaceSource ↗
Props for PptxEditor.ImageAltTextDialog.
interface ImageAltTextDialogProps extends DialogCustomizationProps| Member | Type | Summary |
|---|---|---|
| onClose | () => void | Called on Cancel, Escape, a click on the backdrop, and after OK. |
| open | boolean | Whether the dialog is shown. The host owns this state. |
ImagePropertiesDialogFieldsinterfaceSource ↗
The draft of the Format Picture dialog, in inches, degrees, and percent.
interface ImagePropertiesDialogFields| Member | Type | Summary |
|---|---|---|
| cropBottom | number | Crop of the bottom edge, in percent of the image. |
| cropLeft | number | Crop of the left edge, in percent of the image; a negative value adds space. |
| cropRight | number | Crop of the right edge, in percent of the image. |
| cropTop | number | Crop of the top edge, in percent of the image. |
| height | number | Height in inches, on the slide (`SelectedImageState.heightEmu`). |
| lockAspect | boolean | Lock aspect ratio: a width change scales the height, and the other way round. |
| rotation | number | Rotation in degrees, clockwise. |
| width | number | Width in inches, on the slide (`SelectedImageState.widthEmu`). |
ImagePropertiesDialogPropsinterfaceSource ↗
Props for PptxEditor.ImagePropertiesDialog.
interface ImagePropertiesDialogProps extends DialogCustomizationProps| Member | Type | Summary |
|---|---|---|
| onClose | () => void | Called on Cancel, Escape, a click on the backdrop, and after OK. |
| open | boolean | Whether the dialog is shown. The host owns this state. |
LayoutGalleryPropsinterfaceSource ↗
Props of [LayoutGallery](LayoutGallery), named as DOCX Editor's StylePicker names them.
interface LayoutGalleryProps| Member | Type | Summary |
|---|---|---|
| className? | string | A class name added to the gallery's root element. |
| disabled? | boolean | Show the tiles but take no pick. Default: true while the deck is open for viewing. |
| disabledReason? | string | null | Why the gallery takes no pick, for the tiles' tooltips: a catalog key (such as `useEditorCommand(slotId).disabledReason`) or text. Default: the viewing reason. |
| layouts? | readonly SlideLayoutSummary[] | The layouts to show. Default: every layout of the deck (`useSlideLayouts`). |
| onChange | (layoutId: string) => void | Called with the picked layout's id (`SlideLayoutSummary.id`). |
| value? | string | The layout to mark as the current one (`menuitemradio`, checked). Absent: plain rows. |
LineGlyphPropsinterfaceSource ↗
The props of LineGlyph.
interface LineGlyphProps| Member | Type | Summary |
|---|---|---|
| start? | boolean | Draw the end at the start of the line (mirrored), for the line start menu. |
| value | string | The line kind, line end, or preset dash to draw, as the line menus give it. |
LineMenuControlPropsinterfaceSource ↗
The props of LineMenuControl.
interface LineMenuControlProps| Member | Type | Summary |
|---|---|---|
| control | ChromeControl | The registry entry of the control, from `CHROME_GROUPS`. |
| slot | ChromeSlotId | The chrome slot the control runs. |
LoadingComponentinterfaceSource ↗
The loading part, with the packaged spinner as a static.
interface LoadingComponent| Member | Type | Summary |
|---|---|---|
| (member-0) | | Renders the loading screen, or nothing once the deck is ready. |
| Spinner | typeof LoadingSpinner | The packaged indicator, to compose into custom children. |
LoadingPropsinterfaceSource ↗
Props for PptxEditor.Loading.
interface LoadingProps| Member | Type | Summary |
|---|---|---|
| children? | ReactNode | The whole loading screen in place of the packaged sheet. |
| className? | string | Appended after the `pptx-editor pptx-loading` classes. |
| indicator? | ReactNode | Your own indicator in place of the packaged spinner, centered on the slide-shaped sheet. Include text for screen readers, as the packaged indicator does. |
| overlay? | boolean | Pin the screen over the nearest positioned ancestor, so it covers the previous deck while the next one opens. A short appearance delay keeps a fast open from flashing it. Without `overlay`, the screen is an in-flow box that fills its parent. |
| style? | CSSProperties | Inline styles for the loading container. |
| when? | boolean | An extra host condition, OR-ed with the editor's own. The default already shows the screen while the editor has no deck, so pass this only for work the editor cannot see, such as a host that mounts the root after its own fetch. |
LoadingSpinnerPropsinterfaceSource ↗
Props for PptxEditor.Loading.Spinner.
interface LoadingSpinnerProps| Member | Type | Summary |
|---|---|---|
| className? | string | Appended after the `pptx-loading__spinner` class. |
MenuEntryPropsinterfaceSource ↗
Props for Menu.Entry and the named menus (Menu.File, …).
interface MenuEntryProps| Member | Type | Summary |
|---|---|---|
| after? | ChromeMenuId | (string & {}) | For a host menu: the menu it follows. Without it, host menus follow the built-in ones. |
| children? | ReactNode | The menu's rows: `Menu.Item` children change built-in rows; others add rows. |
| className? | string | A class name added to the menu's panel. |
| icon? | ReactNode | Icon content before the title. |
| id | ChromeMenuId | (string & {}) | A built-in menu id changes that menu; any other id adds a host menu. |
| label? | string | The menu's title. Wins over `labelKey`. Built-in menus keep their own title without it. |
| labelKey? | string | A translation key for the menu's title. |
| preset? | boolean | `true` (default): the built-in rows, with `Menu.Item` children replacing their rows in place and other children added at the end. `false`: only the children. |
MenuGroupPropsinterfaceSource ↗
Props for Menu.Group.
interface MenuGroupProps| Member | Type | Summary |
|---|---|---|
| children? | ReactNode | The group's rows. |
| className? | string | A class name added to the group. |
| label? | string | A heading shown above the rows. Wins over `labelKey`. |
| labelKey? | string | A translation key for the heading. |
MenuNamespaceinterfaceSource ↗
The menu bar with its parts attached as statics.
interface MenuNamespace extends MenuNamedRows| Member | Type | Summary |
|---|---|---|
| (member-0) | | The menu bar. See `MenuProps`. |
| Arrange | MenuPartComponent | The Arrange menu. |
| Edit | MenuPartComponent | The Edit menu. |
| Entry | typeof MenuEntry | A menu of the bar: a built-in id changes it, another id adds a host menu. |
| File | MenuPartComponent | The File menu. |
| Format | MenuPartComponent | The Format menu. |
| Group | typeof MenuGroup | A labeled set of rows. |
| Insert | MenuPartComponent | The Insert menu. |
| Item | typeof MenuSlotItem | A row for a registered slot. |
| Row | typeof MenuRow | A host row: label, icon, shortcut, and an action. |
| Separator | typeof MenuSeparator | A line between rows. |
| SlideShow | MenuPartComponent | The Slide Show menu. |
| Submenu | typeof MenuSubmenu | A row that opens a nested panel. |
| TableGrid | typeof MenuTableGrid | The Insert Table grid, for a host's own Table submenu (DOCX Editor's `Menu.TableGrid`). |
| View | MenuPartComponent | The View menu. |
MenuPartComponentinterfaceSource ↗
A named menu: a Menu.Entry with its id pinned.
interface MenuPartComponent| Member | Type | Summary |
|---|---|---|
| (member-0) | | Changes the built-in menu the part stands for, as a `Menu.Entry` with its id. |
| pptxMenu | ChromeMenuId | The menu the part stands for. |
MenuPropsinterfaceSource ↗
Props for PptxEditor.Menu.
interface MenuProps| Member | Type | Summary |
|---|---|---|
| children? | ReactNode | Named menus and `Menu.Entry` children, and other content after the menus. |
| className? | string | A class name added to the bar. |
| preset? | boolean | `true` (default): the built-in menus, changed by named menu and `Menu.Entry` children; other children follow the menus. `false`: only the children. |
| t? | ChromeTranslate | Your translation function for this compound and its parts, as DOCX Editor's `t`. Without it, the root's `locale` gives the labels. |
MenuRowPartComponentinterfaceSource ↗
A named menu row: a Menu.Item with its slot pinned.
interface MenuRowPartComponent| Member | Type | Summary |
|---|---|---|
| (member-0) | | |
| pptxMenuRow | MenuNamedRow | The registry row the part stands for. |
MenuRowPartPropsinterfaceSource ↗
Props for a named menu row (Menu.Cut, ContextMenu.Cut, …), as DOCX Editor's.
interface MenuRowPartProps| Member | Type | Summary |
|---|---|---|
| className? | string | A class name added to the row. |
| icon? | ReactNode | In place of the registry icon: a Material Symbol name, or icon content (an element). |
| label? | string | The row's text, or a translation key, in place of the registry label. |
| labelKey? | string | A translation key for the row's label, in place of the registry label. |
| shortcutKey? | string | A translation key for the shortcut shown at the end of the row. |
MenuRowPropsinterfaceSource ↗
Props of MenuRow.
interface MenuRowProps| Member | Type | Summary |
|---|---|---|
| active? | boolean | A toggle that is on (Bold on bold text). |
| checked? | boolean | An on/off setting (View Smart guides): a `menuitemcheckbox` with a check when on. |
| className? | string | A class name added to the row. |
| disabled? | boolean | The row cannot run. It stays focusable and names `reason`. |
| disabledReason? | string | null | The same as `reason`, under DOCX Editor's and `Toolbar.Action`'s name. |
| glyph? | ReactNode | Other icon content (a drawn shape or line), in place of `icon` and `paths`. |
| href? | string | A web link: the row opens it in a new tab. Only `http`, `https`, `mailto`, `tel`, and `ftp` links pass `sanitizeHref`; any other link disables the row. |
| icon? | string | ReactNode | A Material Symbol name from `ICON_PATHS`, or icon content (an element), as DOCX Editor's `ContextMenuItem` and `Toolbar.Action` take. |
| label | string | The row's text, and its accessible name. |
| onSelect? | () => void | Runs the row. Inside `PptxEditor.Menu` or `PptxEditor.ContextMenu`, the menu closes after. |
| paths? | readonly string[] | null | SVG path data for the icon, in place of `icon`. |
| radio? | boolean | With `checked`, one choice of several (a Shadow preset, or View Normal and Slide sorter): a `menuitemradio` instead of a `menuitemcheckbox`. |
| reason? | string | null | Why the row is disabled; shown as its tooltip. |
| shortcut? | string | The shortcut hint, already in this platform's form (`useTranslation` gives it). |
| slot? | string | The chrome slot or command the row runs, as `data-slot` for hosts and tests. |
MenuSlotItemPropsinterfaceSource ↗
Props for Menu.Item and ContextMenu.Slot: one registry row.
interface MenuSlotItemProps| Member | Type | Summary |
|---|---|---|
| className? | string | A class name added to the row. |
| direct? | boolean | Run the slot's command at once instead of opening its choices (a value slot such as `slide.add`). Unset, the row runs as the registry row it replaces: Insert New slide adds a slide at once; `direct={false}` opens the layout gallery there. |
| icon? | ReactNode | In place of the registry icon: a Material Symbol name (as `Menu.Row` reads it), or icon content (an element). |
| labelKey? | string | A translation key for the row's label, in place of the registry label. |
| shortcutKey? | string | A translation key for the shortcut shown at the end of the row. |
| slotId | ChromeSlotId | The slot the row runs, for example `text.bold`. |
| value? | string | The value a value slot runs with (`arrange.order` with `front`). |
MenuSubmenuPropsinterfaceSource ↗
Props of MenuSubmenu.
interface MenuSubmenuProps| Member | Type | Summary |
|---|---|---|
| children | ReactNode | The rows of the cascading panel. |
| className? | string | The submenu's own class, for a grid of shapes. |
| disabled? | boolean | The row cannot open its panel. It stays focusable and names `reason`. |
| glyph? | ReactNode | Other icon content (a drawn shape or line), in place of `icon` and `paths`. |
| icon? | string | ReactNode | A Material Symbol name, or icon content (an element). |
| label? | string | The row's label. Wins over `labelKey`. |
| labelKey? | string | A translation key for the label, as DOCX Editor's `Menu.Submenu` takes. |
| paths? | readonly string[] | null | SVG path data for the icon, in place of `icon`. |
| reason? | string | null | Why the row is disabled; shown as its tooltip. |
MenuTableGridPropsinterfaceSource ↗
Props of MenuTableGrid (PptxEditor.Menu.TableGrid), DOCX Editor's Menu.TableGrid part (slot, className), with the props a host menu or toolbar popup needs.
interface MenuTableGridProps| Member | Type | Summary |
|---|---|---|
| autoFocus? | boolean | Move the focus into the grid when it mounts, for a popup opened from the keyboard. |
| className? | string | A class name added to the grid. |
| label? | string | Accessible name of the grid. Default: `table.insert` ("Table"). |
| onInserted? | () => void | Runs after a table is inserted. Default: close the surrounding `PptxEditor.Menu`. |
| onPick? | (rows: number, cols: number) => void | Runs instead of the insert, with the picked size. |
| slot? | ChromeSlotId | The slot whose enabled state gates the insert. Default `table.insert`. |
NotesPanePropsinterfaceSource ↗
Props of NotesPane: the pane props, without a width (the notes take the slide's width), and the format buttons.
interface NotesPaneProps extends Omit<PaneProps, 'paneWidth'>| Member | Type | Summary |
|---|---|---|
| showFormatButtons? | boolean | Show the pane's bold, italic, and underline buttons. Default true. Ctrl/Cmd+B, I, and U work in the notes field either way. |
OpenFailureContextinterfaceSource ↗
What actions receives.
interface OpenFailureContext| Member | Type | Summary |
|---|---|---|
| dismiss | | Close the notice. 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. |
PageSetupDialogFieldsinterfaceSource ↗
The draft of the Page setup dialog. theme keeps the name of the dialog's theme and onThemeChange props on main.
interface PageSetupDialogFields| Member | Type | Summary |
|---|---|---|
| slideSize | SlideSizeFields | The slide size: a preset, the width and height in inches, and whether content scales. |
| theme | 'light' | 'dark' | The chrome theme the appearance choice shows. |
PageSetupDialogPropsinterfaceSource ↗
Props for PptxEditor.PageSetupDialog.
interface PageSetupDialogProps extends DialogCustomizationProps| Member | Type | Summary |
|---|---|---|
| onClose | () => void | Called on Cancel, Escape, a click on the backdrop, and after OK. |
| onThemeChange? | (theme: 'light' | 'dark') => void | Called by OK when the appearance choice changed. |
| open | boolean | Whether the dialog is shown. The host owns this state. |
| theme? | 'light' | 'dark' | The chrome theme; the appearance choice shows only with `onThemeChange`. |
PanePropsinterfaceSource ↗
Props of the editor's panes, after DOCX Editor's Navigation (open, onOpenChange, paneWidth). A pane given open is controlled by the host.
interface PaneProps| Member | Type | Summary |
|---|---|---|
| className? | string | A class name added to the pane. |
| defaultOpen? | boolean | Whether the pane is open first, uncontrolled. Default `true`. |
| onOpenChange? | (open: boolean) => void | Called when the user opens or closes the pane. |
| open? | boolean | Whether the pane is open, controlled. Use with `onOpenChange`. |
| paneWidth? | number | The pane's width in CSS pixels (the slide rail). |
| style? | CSSProperties | Inline styles for the pane, after DOCX Editor's `Navigation`; a `width` here wins over `paneWidth`. |
ParagraphDialogPropsinterfaceSource ↗
Props for PptxEditor.ParagraphDialog.
interface ParagraphDialogProps extends DialogCustomizationProps| Member | Type | Summary |
|---|---|---|
| onClose | () => void | Called on Cancel, Escape, a click on the backdrop, and after OK applies. |
| open | boolean | Whether the dialog is shown. The host owns this state. |
PatternDialogPropsinterfaceSource ↗
Props for PptxEditor.PatternDialog.
interface PatternDialogProps| Member | Type | Summary |
|---|---|---|
| base? | string | The foreground of a new pattern, as `#RRGGBB`. |
| initial | PatternFill | null | The pattern the dialog starts from, or null for a 50% pattern in `base` on white. |
| onApply | (pattern: PatternFill) => void | Called with the pattern the person applied. |
| onClose | () => void | Called when the dialog closes, applied or not. |
| open | boolean | Whether the dialog shows. |
PptxEditorContentPropsinterfaceSource ↗
The props of PptxEditorContent.
interface PptxEditorContentProps| Member | Type | Summary |
|---|---|---|
| className? | string | Appended after the `pptx-canvas` class. |
PptxEditorContextMenuPropsinterfaceSource ↗
Props for PptxEditor.ContextMenu.
interface PptxEditorContextMenuProps| Member | Type | Summary |
|---|---|---|
| children? | ReactNode | `ContextMenu.Slot` children change built-in rows; other children add rows. |
| className? | string | A class name added to the menu. |
| disabled? | boolean | `true` shows no canvas menu, as DOCX Editor's `disabled`. An open menu closes. Default `false`. |
| onOpenChange? | (open: boolean) => void | Called with `true` when the menu opens and `false` when it closes. |
| preset? | boolean | `true` (default): the built-in rows for the target, with `ContextMenu.Slot` children replacing their rows in place and other children added at the end. `false`: only the children. |
| t? | ChromeTranslate | Your translation function for this compound and its parts, as DOCX Editor's `t`. Without it, the root's `locale` gives the labels. |
PptxEditorOpenFailurePropsinterfaceSource ↗
Props for PptxEditor.OpenFailure.
interface PptxEditorOpenFailureProps| Member | Type | Summary |
|---|---|---|
| actions? | (context: OpenFailureContext) => ReactNode | Your own buttons, before **Close**. The notice shows no contact of its own. |
| className? | string | Appended after the `pptx-open-failure` class. |
| closeLabel? | string | The label of the **Close** button. Defaults to the translated `openFailure.close`. |
| message? | ReactNode | ((failure: DocumentOpenFailure) => ReactNode) | Your own message in place of the packaged one, as content or per failure. |
| onDismiss? | (failure: DocumentOpenFailure) => void | Called after the person closes the notice, by any route. |
| showClose? | boolean | Show the packaged **Close** button. Defaults to `true`. |
| showCode? | boolean | Show the stable error code under the message. Defaults to `true`. |
| showCopy? | boolean | Show **Copy details**, which copies `openFailureReport(failure)`: the code, the reason, the editor version, the browser, and the time, for a support request. It holds no file content. Defaults to `true`. |
| style? | CSSProperties | Inline styles for the notice. |
| t? | ChromeTranslate | Your translation function for the notice, as DOCX Editor's `t`. Without it, the root's `locale` gives the labels. |
| title? | string | The notice title. Defaults to the translated `openFailure.title`. |
PptxEditorPopupsinterfaceSource ↗
Render overrides for the dialogs the editor mounts. false disables one. A render callback receives the session props (open, onClose) and can forward them to the packaged dialog with its own options.
interface PptxEditorPopups```tsx
const popups: PptxEditorPopups = {
pageSetup: (props) => <PageSetupDialog {...props} theme={theme} onThemeChange={setTheme} />,
background: false,
};
```| Member | Type | Summary |
|---|---|---|
| background? | PptxEditorPopup<BackgroundDialogProps> | Format background: slide background fill. |
| bulletsAndNumbering? | PptxEditorPopup<BulletsAndNumberingDialogProps> | Format Bullets and Numbering: bullet or number style, size, color, and start number. |
| columns? | PptxEditorPopup<ColumnsDialogProps> | Home Columns More Columns: the number of text columns and the spacing between them. |
| contextMenu? | PptxEditorPopup<PptxEditorContextMenuProps> | The slide canvas's context menu. A callback usually renders `PptxEditor.ContextMenu` with host rows; `false` shows no menu. A `PptxEditor.ContextMenu` placed in the root or the viewport gives the same entry, and this entry wins over it. |
| equation? | PptxEditorPopup<EquationDialogProps> | Insert Equation: a gallery and the linear form of an equation, which inserts an equation or edits the selected one. `false` turns it off; `insertEquation` and `setEquation` keep working from the API. |
| find? | PptxEditorPopup<FindPopupProps> | The find and replace bar (Ctrl/Cmd+F, Ctrl/Cmd+H), rendered where `PptxEditor.FindBar` stands. `false` turns it off; `editor.find` keeps working from the API. |
| font? | PptxEditorPopup<FontDialogProps> | Format Font: font, effects, offset, character spacing, and kerning. |
| hyperlink? | PptxEditorPopup<HyperlinkPopupProps> | The link popup (Ctrl/Cmd+K, the toolbar's link control, Insert Link). `PptxEditor.Root` hosts it, so it opens with no toolbar on the page. `false` turns links off in the chrome: the link control and rows show as disabled; `setLink` keeps working from the API. |
| imageAltText? | PptxEditorPopup<ImageAltTextDialogProps> | The Alt Text dialog of the selected element (Picture Format and the context menu), as DOCX Editor's `imageAltText`. `false` turns it off; `setAltText` keeps working from the API. |
| imageProperties? | PptxEditorPopup<ImagePropertiesDialogProps> | The Format Picture dialog: size, rotation, and crop position of the selected picture, as DOCX Editor's `imageProperties`. `false` turns it off; `setImageProperties` keeps working. |
| pageSetup? | PptxEditorPopup<PageSetupDialogProps> | File Page setup: slide size, appearance, and fonts. |
| paragraph? | PptxEditorPopup<ParagraphDialogProps> | Format Paragraph: alignment, indents, spacing before and after, and line spacing. |
| railContextMenu? | PptxEditorPopup<RailContextMenuProps> | The context menu of a slide in the slide rail and of a tile in the slide sorter. A callback renders the host's menu, or `RailContextMenu` with its own options; `false` shows no menu. |
| sectionContextMenu? | PptxEditorPopup<SectionContextMenuProps> | The menu of a section header in the slide rail and in the slide sorter (Rename, Remove, Move, Collapse all). A callback renders the host's menu, or `SectionContextMenu` with its own options; `false` shows no menu. The section commands keep working from the API. |
PptxEditorPropsinterfaceSource ↗
Props of the <PptxEditor> sugar component.
interface PptxEditorProps| Member | Type | Summary |
|---|---|---|
| author? | string | The author of later comments and replies, as on `PptxEditor.Root`. |
| autoCorrect? | boolean | AutoCorrect while typing, as on `PptxEditor.Root`. Read at mount. |
| children? | ReactNode | Extra content inside the viewport, after the slide show. |
| className? | string | Appended after the `pptx-default` class of the viewport. |
| colorMode? | ColorMode | The chrome color mode, as on `PptxEditor.Root`. |
| contextMenu? | boolean | PptxEditorContextMenuProps | The slide canvas's context menu. An object is `PptxEditorContextMenuProps`, passed straight through, so `contextMenu={{ children: <PptxEditor.ContextMenu.Cut hidden /> }}` changes one row. `false` shows no menu. It sets `popups.contextMenu`, and a `popups.contextMenu` entry wins over it. Default `true`. |
| document? | Uint8Array | `.pptx` bytes. Identity change loads the new document. |
| fontFamilies? | readonly string[] | Families the font picker offers, as on `PptxEditor.Root`. A change applies in place. |
| fonts? | EditorFontsOption | Font bytes for the host's faces, as on `PptxEditor.Root`. |
| hyperlinkPopup? | boolean | The packaged link popup. `false` removes it, as `popups.hyperlink: false` does: a host panel that reads `useHyperlinkPopup()` then opens for the link controls. A `popups.hyperlink` entry wins over it. Default `true`. |
| locale? | LocaleCatalog | UI locale catalog, as on `PptxEditor.Root`. English when omitted. |
| menu? | boolean | MenuProps | The menu bar (`PptxEditor.Menu`), above the toolbar. An object is `MenuProps`, passed straight through, as DOCX Editor's `menu`. Default `false`: the packaged editor shows the toolbar only. |
| mode? | EditorMode | `'edit'` (default) or `'view'`. Changes apply without a reload. |
| modules? | readonly EditorModule[] | Capability modules (`@pptx-editor.dev/pro`), as on `PptxEditor.Root`. Read at mount. |
| notesPane? | boolean | NotesPaneProps | The speaker notes pane (`PptxEditor.NotesPane`). An object is `NotesPaneProps`, passed straight through. `false` removes it. Default `true`. |
| onChange? | (editor: PptxEditorInstance) => void | Fired after every change of editor state, as on `PptxEditor.Root`. |
| onFontError? | (error: EditorFontError) => void | Called for each font failure, as on `PptxEditor.Root`. |
| onReady? | (editor: PptxEditorInstance) => void | Fired once per instance after it is published, as on `PptxEditor.Root`. |
| openFailure? | boolean | PptxEditorOpenFailureProps | The notice for a file that does not open (`PptxEditor.OpenFailure`). An object is `PptxEditorOpenFailureProps`, passed straight through. `false` removes the notice, for a host that reports the failure itself through `useOpenFailure`. Default `true`. |
| popups? | PptxEditorPopups | Customize the dialogs the editor mounts, as on `PptxEditor.Root`. |
| readClipboardDrawing? | ClipboardDrawingReader | Reads copied shapes from the system clipboard, as on `PptxEditor.Root`. Read at mount. |
| renderOpenFailureActions? | (context: OpenFailureContext) => ReactNode | Your own buttons in the open-failure notice, before **Close**. It replaces `openFailure.actions`; pass only one. With `openFailure={false}` it renders nothing. Both cases print a development warning. |
| slideRail? | boolean | SlideRailProps | The slide rail (`PptxEditor.SlideRail`), as DOCX Editor's `navigation`. An object is `SlideRailProps`, passed straight through, so `slideRail={{ open, onOpenChange }}` drives it from your own chrome. `false` removes it. Default `true`. |
| toolbar? | boolean | ToolbarProps | The toolbar (`PptxEditor.Toolbar`). An object is `ToolbarProps`, passed straight through, so `toolbar={{ children: <PptxEditor.Toolbar.Bold hidden /> }}` changes one control. `false` removes it. Default `true`. |
PptxEditorRefinterfaceSource ↗
The imperative handle of PptxEditor and PptxEditor.Root, as DOCX Editor's DocxEditorRef, and the same members as the Vue adapter's. Every member forwards to the editor instance and is safe to call before the editor mounts: load and exec refuse with disabled.noEditor, save and getEditor return null, focus does nothing, and snapshot returns an empty snapshot. Everything else is on the instance that getEditor returns.
interface PptxEditorRef| Member | Type | Summary |
|---|---|---|
| exec | | Run a command, as `editor.exec`. |
| focus | | Give the keyboard back to the slide: the text caret, else the slide surface. |
| getEditor | | The editor instance, or `null` before it mounts. |
| load | | Open `.pptx` bytes. Resolves when the presentation is open, or with the refusal. A long deck resolves when `options.startSlide` (or the first slide) is ready. |
| save | | The presentation as `.pptx` bytes. The bytes own an `ArrayBuffer`, so `new Blob([bytes])` takes them as they are. `null` when no presentation is open, and when a slide of it is damaged: `snapshot().readOnlyReason` is then `'damaged-slide'` (after edits), or `snapshot().openFailure` reports the refused file. |
| snapshot | | The current editor state, as `editor.snapshot()`. |
PptxEditorRootPropsinterfaceSource ↗
Props for PptxEditor.Root. Only document identity reloads the document.
interface PptxEditorRootProps| Member | Type | Summary |
|---|---|---|
| author? | string | The author of later comments and replies, as DOCX Editor's `author` prop. A change applies without a remount (`setAuthor`); existing comments keep their authors. |
| autoCorrect? | boolean | AutoCorrect while typing (default `true`): symbols, ellipses, fractions, and lists started by typing `1.`, `1)`, `*`, or `-` and a space. Capitals, curly quotes, dashes, and spelling are never automatic here: keyboards and systems that offer them apply them. Read once, when the editor is created. |
| children? | ReactNode | The editor's layout: a `PptxEditor.Viewport` with its parts. |
| colorMode? | ColorMode | The chrome color mode: `'light'` (default), `'dark'`, or `'system'`, which follows the operating system. Only the chrome is themed; the slide keeps the deck's own colors. |
| document? | Uint8Array | `.pptx` bytes. Identity change loads the new document. |
| fontFamilies? | readonly string[] | Families the font picker offers besides the standard ones and the deck's own. A change updates the picker in place (`setFontFamilies`); the document and the undo history stay. |
| fonts? | EditorFontsOption | Font bytes for the host's faces, as DOCX Editor's `fonts` prop: a `FontConfiguration`, a fragment, or a `FontResolver` such as `packagedFonts()`. Use `useFonts(...)` for a stable value. A change replaces the fonts in place (`setFonts`); the document, the selection, and the undo history stay. Omitted, the packaged substitutes load and nothing is fetched. |
| locale? | LocaleCatalog | UI locale catalog; English when omitted. |
| mode? | EditorMode | `'edit'` (default) or `'view'`. Changes apply without a reload. |
| modules? | readonly EditorModule[] | Capability modules, as DOCX Editor's `modules` prop: the review and collaboration modules of `@pptx-editor.dev/pro`. Read once, when the editor is created: a later change has no effect and prints a development warning. Create the list once, outside the component. |
| onChange? | (editor: PptxEditorInstance) => void | Fired after every change of editor state. |
| onFontError? | (error: EditorFontError) => void | Called for each font failure: a failed origin, a refused face, or a failed resolution. |
| onReady? | (editor: PptxEditorInstance) => void | Fired once per instance after it is published. |
| popups? | PptxEditorPopups | Customize the dialogs the editor mounts. Set an entry to `false` to turn one off. |
| readClipboardDrawing? | ClipboardDrawingReader | Reads the DrawingML clipboard package from the system clipboard, for a desktop host that can. A paste of copied shapes from another application then pastes editable shapes, not their picture. See `PptxEditorOptions.readClipboardDrawing`. Read once, when the editor is created. |
PptxEditorToolbarNamespaceinterfaceSource ↗
PptxEditor.Toolbar with its statics, as DOCX Editor's DocxEditorToolbarNamespace.
interface PptxEditorToolbarNamespace extends ToolbarNamedParts| Member | Type | Summary |
|---|---|---|
| (member-0) | | The toolbar, with every registered group. See `ToolbarProps`. |
| Action | typeof ToolbarAction | A host-owned action the chrome registry does not describe. |
| Group | typeof ToolbarGroup | Changes a built-in group or adds a host group. |
| Separator | typeof ToolbarSeparator | A vertical rule between controls. |
| Slot | typeof ToolbarSlot | Changes, replaces, or hides one registered control. |
PptxEditorViewportPropsinterfaceSource ↗
The props of PptxEditorViewport.
interface PptxEditorViewportProps| Member | Type | Summary |
|---|---|---|
| children? | ReactNode | The chrome and the content of the editor. |
| className? | string | Appended after the `pptx-editor` class. |
| label? | string | false | The name of the editor's landmark region, or a translation key. Default: "Presentation editor" (`viewport.ariaLabel`). Give each editor its own name when a page shows more than one. `false` renders no region, for a host whose own landmarks (`header`, `main`) are inside. |
RailContextMenuPropsinterfaceSource ↗
Props of the context menu of a slide in the rail or the sorter, and of a popups.railContextMenu renderer.
interface RailContextMenuProps| Member | Type | Summary |
|---|---|---|
| menu | RailMenuState | Where the menu opens, on which slide, and how. |
| onBackground? | () => void | Opens the background dialog; the row is left out when the dialog is turned off. |
| onClose | () => void | Called when the menu closes. |
| onSectionAdded? | (sectionId: string) => void | A section was added at the slide: the rail starts renaming it. |
RailMenuStateinterfaceSource ↗
An open rail menu: where, on which slide, and how it opened.
interface RailMenuState| Member | Type | Summary |
|---|---|---|
| at | ContextMenuPoint | Where the menu opens: the pointer, or the slide for a keyboard open. |
| index | number | The slide the menu opened on, from 0. |
| keyboard | boolean | Opened from the keyboard: focus goes to the first row. |
| owner | HTMLElement | null | The element the menu opened on; its editor scope carries the theme tokens. |
RibbonNamespaceinterfaceSource ↗
The ribbon with its parts attached as statics.
interface RibbonNamespace| Member | Type | Summary |
|---|---|---|
| (member-0) | | The ribbon. See `RibbonProps`. |
| Tab | typeof RibbonTab | A tab: a built-in id changes it, another id adds a host tab. |
RibbonPropsinterfaceSource ↗
Props for PptxEditor.Ribbon.
interface RibbonProps| Member | Type | Summary |
|---|---|---|
| children? | ReactNode | `Ribbon.Tab` children. |
| className? | string | A class name added to the ribbon. |
| defaultTab? | RibbonTabId | (string & {}) | The tab selected first, uncontrolled. Default `home`. |
| onTabChange? | (tab: string) => void | Called when the user selects another tab. |
| overflow? | boolean | `false`: a tab's groups wrap instead of moving into the More menu. Default `true`. |
| preset? | boolean | `true` (default): the tabs of `RIBBON_TABS`, changed by `Ribbon.Tab` children. `false`: only the `Ribbon.Tab` children. |
| tab? | RibbonTabId | (string & {}) | The selected tab, controlled. Use with `onTabChange`. |
RibbonTabPropsinterfaceSource ↗
Props for PptxEditor.Ribbon.Tab.
interface RibbonTabProps| Member | Type | Summary |
|---|---|---|
| after? | RibbonTabId | (string & {}) | For a host tab: the tab it follows. Without it, host tabs follow the built-in ones. |
| children? | ReactNode | `Toolbar.Slot`, named parts, `Toolbar.Group`, and `Toolbar.Action` for the tab's panel, as toolbar children: they change the tab's groups, or are the groups of a host tab. |
| className? | string | A class name added to the tab's panel. |
| id | RibbonTabId | (string & {}) | A built-in tab id changes that tab; any other id adds a host tab. |
| label? | string | The tab's title. Wins over `labelKey`. Built-in tabs keep their own title without it. |
| labelKey? | string | A translation key for the tab's title. |
SectionContextMenuPropsinterfaceSource ↗
Props of the section menu, and of a popups.sectionContextMenu renderer: the menu of a section header in the slide rail and in the slide sorter.
interface SectionContextMenuProps| Member | Type | Summary |
|---|---|---|
| menu | SectionMenuState | Where the menu opens, and how. |
| onClose | () => void | Closes the menu. Call it when a row runs or the user dismisses the menu. |
| onRemoved | () => void | Call after a row removes sections: focus goes to the current slide after the render. |
| onRename | () => void | Starts renaming the section in place, in the rail or the sorter that opened the menu. |
| section | SlideSection | The section whose header opened the menu. |
SectionMenuStateinterfaceSource ↗
An open section menu: where it opens, how it opened, and the element it belongs to.
interface SectionMenuState| Member | Type | Summary |
|---|---|---|
| at | ContextMenuPoint | The point where the menu opens, in viewport pixels. |
| keyboard | boolean | Whether a key opened the menu (Shift+F10 or the Menu key). The menu then puts focus on its first row; after a right-click, on the menu itself. |
| owner | HTMLElement | null | The element the menu belongs to: the section header. Focus goes back to it on close. |
SelectionPanePropsinterfaceSource ↗
Props of SelectionPane.
interface SelectionPaneProps| Member | Type | Summary |
|---|---|---|
| className? | string | A class name added to the pane. |
ShapeGalleryControlPropsinterfaceSource ↗
The props of ShapeGalleryControl.
interface ShapeGalleryControlProps| Member | Type | Summary |
|---|---|---|
| control | ChromeControl | The registry entry of the control, from `CHROME_GROUPS`. |
| slot | ChromeSlotId | The chrome slot the control runs. |
ShapeGridPropsinterfaceSource ↗
The props of ShapeGrid.
interface ShapeGridProps| Member | Type | Summary |
|---|---|---|
| onPick | (preset: string) => void | Called with the preset the person picked. |
| presets | readonly string[] | The preset geometry names to show, in order. |
ShapeIconPropsinterfaceSource ↗
The props of ShapeIcon.
interface ShapeIconProps| Member | Type | Summary |
|---|---|---|
| preset | string | The preset geometry name (`a:prstGeom/@prst`), such as `rect`. |
ShapeStyleGalleryPropsinterfaceSource ↗
Props of ShapeStyleGallery.
interface ShapeStyleGalleryProps| Member | Type | Summary |
|---|---|---|
| className? | string | A class name added to the gallery. |
| onPick | (cell: ShapeStyleChoice) => void | Called with the picked cell. |
| value? | ShapeStyleChoice | ShapeStyleValue | null | The cell to check: a cell, or the slot value (`row.color`, as `useEditorValueCommand('shape.styles').value` gives it), or null for none. |
SidePanelPropsinterfaceSource ↗
Props of SidePanel. The host shows or hides the panel by rendering it.
interface SidePanelProps| Member | Type | Summary |
|---|---|---|
| className? | string | A class name added to the panel. |
| onClose? | () => void | Shows a close button that calls it. |
| onTabChange? | (tab: SidePanelTab) => void | Called with the tab the user picks. |
| panes? | Partial<Record<SidePanelTab, ReactNode>> | Content that replaces a tab's packaged pane, by tab. The **Comments** tab has no packaged pane: pass the comments pane of `@pptx-editor.dev/pro/react` as `panes.comments`. Without it, the tab says that comments are kept when you save. |
| paneWidth? | number | The panel's width in CSS pixels. |
| style? | CSSProperties | Inline styles for the panel; a `width` here wins over `paneWidth`. |
| tab? | SidePanelTab | The tab that shows. Set it with `onTabChange` to control the tab; omit it to start on Format. |
SlideRailNamespaceinterfaceSource ↗
The slide rail with its action parts attached as statics, as StatusBarNamespace.
interface SlideRailNamespace| Member | Type | Summary |
|---|---|---|
| (member-0) | | The slide rail. See `SlideRailProps`. |
| Action | typeof ToolbarAction | A host-owned button with the rail's styling: the same component as `Toolbar.Action`. |
| AddSlide | typeof SlideRailAddSlide | Add slide. |
| ChooseLayout | typeof SlideRailChooseLayout | The layout gallery button. |
| Collapse | typeof SlideRailCollapse | Hide thumbnails. |
| Delete | typeof SlideRailDelete | Delete the selected slides. |
| Duplicate | typeof SlideRailDuplicate | Duplicate the selected slides. |
| Expand | typeof SlideRailExpand | Show thumbnails: the button of the folded strip. |
| MoveEarlier | typeof SlideRailMoveEarlier | Move the selected slides earlier. |
| MoveLater | typeof SlideRailMoveLater | Move the selected slides later. |
SlideRailPartPropsinterfaceSource ↗
Props of every named part of the slide rail's action row.
interface SlideRailPartProps| Member | Type | Summary |
|---|---|---|
| asChild? | boolean | Render the one element child as the button: it gets the part's label, state, disabled reason, and click, as `SlideRail.Action` and `Toolbar.Action` do. |
| children? | ReactNode | The element for `asChild`. |
| className? | string | A class name added to the button. |
| icon? | ReactNode | Icon content in place of the packaged icon, about 18 pixels. |
SlideRailPropsinterfaceSource ↗
Props of SlideRail: the pane props, DOCX Editor's toggle, and orientation.
interface SlideRailProps extends PaneProps| Member | Type | Summary |
|---|---|---|
| children? | ReactNode | Named part children replace their buttons; other children go after **Delete**. |
| orientation? | SlideRailOrientation | Where the rail runs. `vertical` (the default) is a column beside the slide. `horizontal` is a row under it, for a tall, narrow host: the thumbnails scroll sideways, Left and Right step, a drag reorders along the row, and Hide thumbnails folds the rail down. |
| preset? | boolean | `true` (default): the packaged action buttons, with named part children (`SlideRail.AddSlide`, `SlideRail.Delete`, …) in their places and other children after Delete. `false`: only the children, in their order. |
| t? | ChromeTranslate | Your translation function for this compound and its parts, as DOCX Editor's `t`. Without it, the root's `locale` gives the labels. |
| toggle? | boolean | The built-in Hide thumbnails and Show thumbnails buttons. `false` removes them, for a host that opens and closes the rail from its own chrome (`open`, `onOpenChange`). |
SlideSorterPropsinterfaceSource ↗
Props of [SlideSorter](SlideSorter).
interface SlideSorterProps| Member | Type | Summary |
|---|---|---|
| className? | string | A class name added to the sorter. |
StatusBarNamespaceinterfaceSource ↗
The status bar with its parts attached as statics.
interface StatusBarNamespace| Member | Type | Summary |
|---|---|---|
| (member-0) | | The status bar. See `StatusBarProps`. |
| Action | typeof ToolbarAction | A host-owned button with the bar's styling: the same component as `Toolbar.Action`. |
| Notes | typeof StatusBarNotes | The Notes button. |
| SlideNumber | typeof StatusBarSlideNumber | "Slide x of y". |
| Views | typeof StatusBarViews | The view switch. |
| Zoom | typeof StatusBarZoom | The zoom pill. |
StatusBarNotesPropsinterfaceSource ↗
Props of StatusBar.Notes: the part props, and the ladder's icon and asChild.
interface StatusBarNotesProps extends StatusBarPartProps| Member | Type | Summary |
|---|---|---|
| asChild? | boolean | Render the one element child as the button: it gets the label, state, and click. |
| children? | ReactNode | The element for `asChild`. |
| icon? | ReactNode | Icon content in place of the packaged icon. |
StatusBarPartPropsinterfaceSource ↗
Props of every status bar part.
interface StatusBarPartProps| Member | Type | Summary |
|---|---|---|
| className? | string | A class name added to the part. |
StatusBarPropsinterfaceSource ↗
Props for PptxEditor.StatusBar.
interface StatusBarProps| Member | Type | Summary |
|---|---|---|
| children? | ReactNode | Named part children replace their parts; other children go after **Notes**. |
| className? | string | A class name added to the bar. |
| preset? | boolean | `true` (default): slide number, notes, views, and zoom, with named part children replacing their parts in place and other children after the notes button. `false`: only the children. |
| t? | ChromeTranslate | Your translation function for this compound and its parts, as DOCX Editor's `t`. Without it, the root's `locale` gives the labels. |
ToolbarActionPropsinterfaceSource ↗
Props for PptxEditor.Toolbar.Action.
interface ToolbarActionProps| Member | Type | Summary |
|---|---|---|
| active? | boolean | The pressed state, for an action that toggles: `aria-pressed` and `data-active`. |
| asChild? | boolean | Merge the behavior onto the single child element instead of rendering a `<button>`. |
| children? | ReactNode | Visible content when there is no `icon`, or the element for `asChild`. |
| className? | string | A class name added to the button. |
| disabled? | boolean | Turn the action off: the button stays focusable (`aria-disabled`) and `onSelect` does not run. |
| disabledReason? | string | Why the action is disabled: in the tooltip and spoken through `aria-describedby`. |
| icon? | ReactNode | Icon content, about 18 pixels, as the packaged icons. |
| label | string | The accessible name and tooltip: a resolved string from the host's own catalog. |
| onSelect? | () => void | Runs the host's action. |
ToolbarColorSplitComponentinterfaceSource ↗
A named color split part: a component with its slot as a static.
interface ToolbarColorSplitComponent| Member | Type | Summary |
|---|---|---|
| (member-0) | | Changes, replaces, or hides the color control the part stands for. |
| pptxSlot | ChromeSlotId | The slot the part stands for. The toolbar reads it to place the part. |
ToolbarColorSplitPropsinterfaceSource ↗
Props for the named color split parts (Toolbar.FontColor, Toolbar.Highlight, Toolbar.ShapeFill, Toolbar.LineColor), as DOCX Editor's ToolbarColorSplitProps: the main half takes an icon (the glyph over the color bar).
interface ToolbarColorSplitProps extends ToolbarSlotPartProps| Member | Type | Summary |
|---|---|---|
| icon? | ReactNode | A host glyph over the color bar, in place of the registry icon. |
ToolbarContextValueinterfaceSource ↗
What a compound's t prop publishes to its parts, as DOCX Editor's toolbar context.
interface ToolbarContextValue| Member | Type | Summary |
|---|---|---|
| t | ChromeTranslate | undefined | The host's `t` on the nearest compound, or undefined. |
ToolbarControlPropsinterfaceSource ↗
The props of ToolbarControl.
interface ToolbarControlProps| Member | Type | Summary |
|---|---|---|
| control | ChromeControl | The registry entry of the control, from `CHROME_GROUPS`. |
| group | string | The id of the group the control belongs to, such as `text`. |
ToolbarGroupPropsinterfaceSource ↗
Props for PptxEditor.Toolbar.Group.
interface ToolbarGroupProps| Member | Type | Summary |
|---|---|---|
| after? | ChromeGroupId | (string & {}) | The group a host group follows. Without it, a host group follows every built-in group. A built-in id ignores it, with a development warning. |
| children? | ReactNode | Controls added after the group's built-in controls, or the controls of a host group. |
| className? | string | A class name added to the group's element. |
| id | ChromeGroupId | (string & {}) | A built-in group id changes that group; any other id adds a host group. |
| label? | string | The accessible name of a host group. Wins over `labelKey`. |
| labelKey? | string | A translation key for the name of a host group, used when there is no `label`. |
| overflowContent? | () => ReactNode | Content for the group in the More menu: after the controls of a built-in group, as in DOCX Editor, so a built-in id adds a menu-only row; in place of a host group's controls. |
| pinned? | boolean | Keep the group on the bar at every width. |
| priority? | number | Collapse priority: a lower number leaves the bar for the More menu first. Built-in groups use 10 (the last group) up to 90 (history). A host group without one leaves first. |
ToolbarNamedPartsinterfaceSource ↗
Every named toolbar part, attached to PptxEditor.Toolbar as statics: button parts take ToolbarPartProps, picker parts ToolbarSlotPartProps, as in DOCX Editor.
interface ToolbarNamedParts| Member | Type | Summary |
|---|---|---|
| AddComment | ToolbarPartComponent | `review.addComment`. |
| AddSection | ToolbarPartComponent | `section.add`. |
| Alignment | ToolbarSlotPartComponent | `paragraph.align`. |
| AlignObjects | ToolbarSlotPartComponent | `arrange.align`. |
| Autofit | ToolbarSlotPartComponent | `paragraph.autofit`. |
| Bold | ToolbarPartComponent | `text.bold`. |
| BulletList | ToolbarPartComponent | `list.bullet`. |
| BulletStyle | ToolbarSlotPartComponent | `list.bulletStyle`: the Bullets gallery. |
| ChangeCase | ToolbarSlotPartComponent | `text.changeCase`. |
| CharacterSpacing | ToolbarSlotPartComponent | `text.characterSpacing`. |
| ChartEditData | ToolbarPartComponent | `chart.editData`. |
| ChartInsert | ToolbarSlotPartComponent | `insert.chart`: the chart types; a pick inserts a chart and opens the Chart tab. |
| ClearFormatting | ToolbarPartComponent | `format.clear`. |
| CollapseAllSections | ToolbarPartComponent | `section.collapseAll`. |
| Columns | ToolbarSlotPartComponent | `paragraph.columns`. |
| Copy | ToolbarPartComponent | `edit.copy`. |
| Cut | ToolbarPartComponent | `edit.cut`. |
| Delete | ToolbarPartComponent | `more.delete`. |
| DiagramAddAfter | ToolbarPartComponent | `diagram.addAfter`. |
| DiagramAddBefore | ToolbarPartComponent | `diagram.addBefore`. |
| DiagramAddBelow | ToolbarPartComponent | `diagram.addBelow`. |
| DiagramDelete | ToolbarPartComponent | `diagram.delete`. |
| DiagramEditText | ToolbarPartComponent | `diagram.editText`. |
| Duplicate | ToolbarPartComponent | `more.duplicate`. |
| Equation | ToolbarPartComponent | `insert.equation`: opens the Equation dialog. |
| ExpandAllSections | ToolbarPartComponent | `section.expandAll`. |
| Find | ToolbarPartComponent | `find.find`. |
| Font | ToolbarPartComponent | `text.dialog`: opens the Font dialog. |
| FontColor | ToolbarColorSplitComponent | `text.color`. |
| FontFamily | FontFamilyNamespace | `font.family`, with its `Trigger`, `Content`, and `Item` parts. |
| FontSize | ToolbarSlotPartComponent | `font.size`. |
| FormatBackground | ToolbarPartComponent | `slide.background`. |
| FormatPainter | ToolbarPartComponent | `format.painter`. |
| FormatShape | ToolbarPartComponent | `shape.properties`. |
| GroupObjects | ToolbarPartComponent | `arrange.group`. |
| HideSlide | ToolbarPartComponent | `slide.hide`. |
| Highlight | ToolbarColorSplitComponent | `text.highlight`. |
| ImageAltText | ToolbarPartComponent | `image.altText`. |
| ImageChange | ToolbarPartComponent | `image.change`. |
| ImageColor | ToolbarPartComponent | `image.color`. |
| ImageCorrections | ToolbarPartComponent | `image.corrections`. |
| ImageCrop | ToolbarPartComponent | `image.crop`. |
| ImageCropFit | ToolbarPartComponent | `image.cropFit`. |
| ImageCropToShape | ToolbarPartComponent | `image.cropToShape`. |
| ImageInsert | ToolbarPartComponent | `insert.image`. |
| ImageProperties | ToolbarPartComponent | `image.properties`. |
| ImageReset | ToolbarPartComponent | `image.reset`. |
| ImageStyles | ToolbarPartComponent | `image.styles`. |
| ImageTransparency | ToolbarPartComponent | `image.transparency`. |
| Indent | ToolbarPartComponent | `list.indent`. |
| Italic | ToolbarPartComponent | `text.italic`. |
| Line | ToolbarSlotPartComponent | `insert.line`. |
| LineColor | ToolbarColorSplitComponent | `shape.lineColor`. |
| LineDash | ToolbarSlotPartComponent | `shape.lineDash`. |
| LineEnd | ToolbarSlotPartComponent | `shape.lineEnd`. |
| LineSpacing | ToolbarSlotPartComponent | `list.lineSpacing`. |
| LineStart | ToolbarSlotPartComponent | `shape.lineStart`. |
| LineWidth | ToolbarSlotPartComponent | `shape.lineWidth`. |
| Link | ToolbarPartComponent | `text.link`. |
| NewSlide | ToolbarPartComponent | `slide.add`: New slide, with its layout gallery. |
| NumberedList | ToolbarPartComponent | `list.numbered`. |
| NumberStyle | ToolbarSlotPartComponent | `list.numberStyle`: the Numbering gallery. |
| Order | ToolbarSlotPartComponent | `arrange.order`. |
| Outdent | ToolbarPartComponent | `list.outdent`. |
| PageSetup | ToolbarPartComponent | `file.pageSetup`. |
| Paragraph | ToolbarPartComponent | `paragraph.dialog`: opens the Paragraph dialog. |
| Paste | ToolbarPartComponent | `edit.paste`. |
| PlayFromCurrent | ToolbarPartComponent | `view.playFromCurrent`. |
| PlayFromStart | ToolbarPartComponent | `view.playFromStart`. |
| PresentationView | ToolbarPartComponent | `view.presentationView`: the Normal or Slide sorter view. |
| Redo | ToolbarPartComponent | `history.redo`. |
| RemoveAllSections | ToolbarPartComponent | `section.removeAll`. |
| RemoveSection | ToolbarPartComponent | `section.remove`. |
| RenameSection | ToolbarPartComponent | `section.rename`. |
| Replace | ToolbarPartComponent | `find.replace`. |
| ResetSlide | ToolbarPartComponent | `slide.reset`. |
| Rotate | ToolbarSlotPartComponent | `arrange.rotate`. |
| SelectAll | ToolbarPartComponent | `edit.selectAll`. |
| SelectionPane | ToolbarPartComponent | `arrange.selectionPane`. |
| ShapeEffects | ToolbarSlotPartComponent | `shape.effects`. |
| ShapeFill | ToolbarColorSplitComponent | `shape.fill`. |
| Shapes | ToolbarSlotPartComponent | `insert.shape`. |
| ShapeStyles | ToolbarSlotPartComponent | `shape.styles`. |
| SlideLayout | ToolbarPartComponent | `slide.layout`: the layout gallery of the current slide. |
| SmartGuides | ToolbarPartComponent | `view.smartGuides`. |
| Strike | ToolbarPartComponent | `text.strike`. |
| Subscript | ToolbarPartComponent | `script.sub`. |
| Superscript | ToolbarPartComponent | `script.super`. |
| TableBandedColumns | ToolbarPartComponent | `table.bandedColumns`. |
| TableBandedRows | ToolbarPartComponent | `table.bandedRows`. |
| TableBorderColor | ToolbarColorSplitComponent | `table.borderColor`. |
| TableBorderStyle | ToolbarSlotPartComponent | `table.borderStyle`. |
| TableBorderTarget | ToolbarSlotPartComponent | `table.borderTarget`. |
| TableBorderWidth | ToolbarSlotPartComponent | `table.borderWidth`. |
| TableCellFill | ToolbarColorSplitComponent | `table.cellFill`. |
| TableCellMargins | ToolbarSlotPartComponent | `table.cellMargins`. |
| TableDelete | ToolbarSlotPartComponent | `table.delete`. |
| TableDistributeColumns | ToolbarPartComponent | `table.distributeColumns`. |
| TableDistributeRows | ToolbarPartComponent | `table.distributeRows`. |
| TableFirstColumn | ToolbarPartComponent | `table.firstColumn`. |
| TableHeaderRow | ToolbarPartComponent | `table.headerRow`. |
| TableInsert | ToolbarPartComponent | `table.insert`. |
| TableInsertColumnLeft | ToolbarPartComponent | `table.insertColumnLeft`. |
| TableInsertColumnRight | ToolbarPartComponent | `table.insertColumnRight`. |
| TableInsertRowAbove | ToolbarPartComponent | `table.insertRowAbove`. |
| TableInsertRowBelow | ToolbarPartComponent | `table.insertRowBelow`. |
| TableLastColumn | ToolbarPartComponent | `table.lastColumn`. |
| TableMergeCells | ToolbarPartComponent | `table.mergeCells`. |
| TableSelect | ToolbarSlotPartComponent | `table.select`. |
| TableSplitCell | ToolbarSlotPartComponent | `table.splitCell`. |
| TableStyle | ToolbarSlotPartComponent | `table.style`. |
| TableTotalRow | ToolbarPartComponent | `table.totalRow`. |
| TextBox | ToolbarPartComponent | `insert.textBox`. |
| TextDirection | ToolbarSlotPartComponent | `paragraph.textDirection`. |
| TextEffects | ToolbarSlotPartComponent | `shape.textEffects`. |
| Underline | ToolbarPartComponent | `text.underline`. |
| Undo | ToolbarPartComponent | `history.undo`. |
| UngroupObjects | ToolbarPartComponent | `arrange.ungroup`. |
| VerticalAlignment | ToolbarSlotPartComponent | `paragraph.valign`. |
ToolbarPartComponentinterfaceSource ↗
A named toolbar part: a Toolbar.Slot with its slot pinned.
interface ToolbarPartComponent| Member | Type | Summary |
|---|---|---|
| (member-0) | | Changes, replaces, or hides the control the part stands for. |
| pptxSlot | ChromeSlotId | The slot the part stands for. The toolbar reads it to place the part. |
ToolbarPropsinterfaceSource ↗
Props for PptxEditor.Toolbar.
interface ToolbarProps| Member | Type | Summary |
|---|---|---|
| children? | ReactNode | `Toolbar.Slot` and `Toolbar.Group` overrides, or the whole bar when `preset` is false. |
| className? | string | A class name added to the bar. |
| contextual? | boolean | `true` (default): the bar shows only the groups that act on the selection (text, a shape, a picture, a table, or nothing). `false`: every bar group shows for every selection, disabled with the engine's reason where it cannot run, and the picture or table group joins after them. Hiding a group never turns off its commands. |
| overflow? | boolean | `true` (default): groups that do not fit the width move into a More menu, lowest priority first. `false`: the bar wraps to more rows instead. A `preset={false}` bar never measures itself, so it always wraps, as in DOCX Editor. |
| preset? | boolean | `true` (default): the registry's groups, changed by `Toolbar.Slot` and `Toolbar.Group` children. `false`: only the children, in the order given. |
| t? | ChromeTranslate | Your translation function for this compound and its parts, as DOCX Editor's `t`. Without it, the root's `locale` gives the labels. |
ToolbarSeparatorPropsinterfaceSource ↗
Props for PptxEditor.Toolbar.Separator.
interface ToolbarSeparatorProps| Member | Type | Summary |
|---|---|---|
| className? | string | A class name added to the separator. |
ToolbarSlotBasePropsinterfaceSource ↗
What every Toolbar.Slot takes.
interface ToolbarSlotBaseProps| Member | Type | Summary |
|---|---|---|
| className? | string | A class name added to the control. |
| icon? | ReactNode | A host icon in place of the registry icon. Button controls only. |
| slotId | ChromeSlotId | The registered control, for example `text.bold`. |
ToolbarSlotPartComponentinterfaceSource ↗
A named picker part: a component with its slot as a static.
interface ToolbarSlotPartComponent| Member | Type | Summary |
|---|---|---|
| (member-0) | | Changes, replaces, or hides the control the part stands for. |
| pptxSlot | ChromeSlotId | The slot the part stands for. The toolbar reads it to place the part. |
ToolbarSlotPartPropsinterfaceSource ↗
Props for the named picker parts (Toolbar.FontFamily, Toolbar.FontColor, …), as DOCX Editor's slot parts: a picker is not one button, so it takes no icon, asChild, or children.
interface ToolbarSlotPartProps| Member | Type | Summary |
|---|---|---|
| className? | string | A class name added to the control's trigger. |
UseBackgroundDialogReturninterfaceSource ↗
The Background draft and its actions.
interface UseBackgroundDialogReturn extends UseDialogReturn<BackgroundDialogFields>| Member | Type | Summary |
|---|---|---|
| reset | | Pick the layout's background in the draft. |
UseBulletFormatReturninterfaceSource ↗
What useBulletFormat returns.
interface UseBulletFormatReturn| Member | Type | Summary |
|---|---|---|
| apply | (format: BulletFormat | null) => boolean | Write a bullet format (null turns the list off) as ONE undo step. An omitted field keeps each paragraph's value; with no `kind`, the size and color change and each paragraph keeps its own bullet or number. Returns whether the engine accepted it. |
| format | BulletFormatRead | null | undefined | The bullet format of the selected paragraphs: null when they have no list, undefined when they differ or nothing with text is selected. |
| isEnabled | boolean | Whether the engine can write a bullet format now (text or a shape with text selected, editable). |
UseDialogReturninterfaceSource ↗
A dialog's draft and actions, as its parts and a host's own fields read them.
interface UseDialogReturn<Fields extends object>| Member | Type | Summary |
|---|---|---|
| apply | | Validate and commit the draft. The dialog closes when the document took it. |
| cancel | | Discard the draft and close. |
| errors | Readonly<Partial<Record<Extract<keyof Fields, string> | 'form', string>>> | Translated messages per field, and `form` for the whole draft. |
| isEnabled | boolean | False when the dialog cannot apply now (no document, viewing mode). |
| setValue | | Change one field of the draft. |
| values | Fields | The draft values. |
UseDocumentSearchResultinterfaceSource ↗
What [useDocumentSearch](useDocumentSearch) returns, as DOCX Editor's UseDocumentSearchResult.
interface UseDocumentSearchResult extends DocumentSearchState| Member | Type | Summary |
|---|---|---|
| clear | () => void | Empty the query and drop the matches. The selection stays. |
| find | (query: string, options?: DocumentSearchFindOptions) => readonly FindMatch[] | Search now and return the matches. `selectFirst` selects the first match. |
| goTo | (index: number) => boolean | Select the match at `index` and show its slide. False for an index with no match. |
| next | () => boolean | Select the next match, after the last one the first. |
| previous | () => boolean | Select the previous match, before the first one the last. |
| setMatchCase | (value: boolean) => void | |
| setQuery | (query: string) => void | Change the text to find. The matches update at once. |
| setWholeWord | (value: boolean) => void |
UseEditorColorModeReturninterfaceSource ↗
What useEditorColorMode returns.
interface UseEditorColorModeReturn| Member | Type | Summary |
|---|---|---|
| colorMode | ResolvedColorMode | The resolved theme: `'dark'` or `'light'`. Re-renders when `colorMode` or the OS setting changes. |
UseEditorCommandReturninterfaceSource ↗
A chrome slot's state and its runner: one source of enabled state.
interface UseEditorCommandReturn| Member | Type | Summary |
|---|---|---|
| disabledReason | string | null | Why the command cannot run: a catalog key, or the engine's own text. Show it with `translateKeyOrText(t, reason)`. |
| execute | (value?: unknown) => boolean | Run the slot's command, with a value for value controls: the picked option's value, a number of points for `font.size`, or `{ step: 1 }` / `{ step: -1 }` for its Increase and Decrease Font Size buttons (`commandForSlotValue`). Returns true when the engine ran it and false on a refusal, as in DOCX Editor. |
| isActive | boolean | Whether a toggle control shows as pressed. |
| isEnabled | boolean | Whether the command can run now. |
| value? | string | number | The value a value control shows (a font size, a family), when it has one. |
UseEditorDialogReturninterfaceSource ↗
What useEditorDialog returns.
interface UseEditorDialogReturn| Member | Type | Summary |
|---|---|---|
| close | | Hide the dialog. |
| isAvailable | boolean | False when the popup entry is `false`: hide or disable the control that opens it. |
| isOpen | boolean | Whether the dialog shows now. |
| open | | Show the dialog. Focus returns to `returnFocusTo`, or to the element that has focus now, when it closes. Does nothing when the popup entry is `false`. |
UseEditorValueCommandReturninterfaceSource ↗
A typed value slot's state and runner, after DOCX Editor's useEditorValueCommand.
interface UseEditorValueCommandReturn<V, S = V>| Member | Type | Summary |
|---|---|---|
| disabledReason | string | null | Why the command cannot run: a catalog key, or the engine's own text. |
| execute | (value: V, options?: EditorExecOptions) => CommandResult | Run the slot's command with a value of its `ToolbarValueMap` type. The result says why the engine refused it (`disabled.invalidValue`, `disabled.noEffectChange`). Pass `{ historyGroup }` to make the values of one gesture (a slider drag) one undo step. |
| isEnabled | boolean | Whether the command can run now. |
| options | readonly V[] | The slot's fixed choices, from the registry (the Rotate, Align, line width, or Shape Effects rows); none for a slot with a free value (`font.size`, `shape.fill`, `shape.styles`). Without the `@pptx-editor.dev/pro/drawing` module, they leave out the effects it paints (`chromeOfferedControl`), so `value` can be an effect from the file that is not in the list. They keep the rows that remove an effect the selection has (`reflection.none`). |
| value | S | null | The value the slot shows (`ToolbarShownValue`), or null when it is mixed or unavailable. |
UseFontFamilyReturninterfaceSource ↗
What useFontFamily returns, as DOCX Editor's UseFontFamilyResult.
interface UseFontFamilyReturn| Member | Type | Summary |
|---|---|---|
| disabledReason | string | null | Why the font cannot change: a catalog key, or the engine's own text. |
| groups | readonly FontPickerGroup[] | The packaged picker's groups for the current slide, empty groups left out: the theme fonts (labeled Headings and Body), the other families the deck names, then all families. |
| isCurrent | (row: FontPickerRow) => boolean | Whether a row is the font the selected text uses, for a check mark. |
| isEnabled | boolean | Whether the engine can change the font now. |
| options | readonly string[] | Every family the editor offers: standard, configured, embedded, and the deck's own. |
| setValue | (family: string) => void | Apply a family, or a theme font reference (`+mj-lt`, `+mn-lt`) so the text follows a later theme change. A refusal does nothing. |
| theme | 'major' | 'minor' | null | The theme font the selected text uses (`major` for the headings font, `minor` for the body font), or null when it names a family. |
| value | string | null | The family of the selected text, or null for a mixed selection or no selection. |
UseFontFormatReturninterfaceSource ↗
What useFontFormat returns.
interface UseFontFormatReturn| Member | Type | Summary |
|---|---|---|
| apply | (update: FontFormatCommand) => boolean | Write the given fields as ONE undo step. Returns whether the engine accepted them. |
| format | FontFormatRead | null | The font of the selected text, or of every run of the selected shapes; null with none. |
| isEnabled | boolean | Whether the engine can write font formatting now (text or a shape with text selected, editable). |
UseHistoryGroupReturninterfaceSource ↗
What [useHistoryGroup](useHistoryGroup) returns.
interface UseHistoryGroupReturn| Member | Type | Summary |
|---|---|---|
| options | () => EditorExecOptions | The options for each command of the gesture: `{ historyGroup }`. |
| ref | (element: HTMLElement | null) => void | Put it on the control: the slider, the stepper, or the color input. |
UseHyperlinkPopupResultinterfaceSource ↗
What useHyperlinkPopup returns, as DOCX Editor's hook of the same name.
interface UseHyperlinkPopupResult extends HyperlinkPopupActions| Member | Type | Summary |
|---|---|---|
| state | HyperlinkPopupState | Whether the popup shows, what it shows, and the draft. |
UseNotesPaneReturninterfaceSource ↗
What useNotesPane returns.
interface UseNotesPaneReturn| Member | Type | Summary |
|---|---|---|
| open | boolean | Whether the notes pane shows its text. |
| setOpen | (open: boolean) => void | Show or hide the notes text. A controlled pane gets the change through `onOpenChange`. |
| toggle | () => void | Show the notes text when hidden, and hide it when shown. |
UseOpenFailureOptionsinterfaceSource ↗
Options for useOpenFailure, as DOCX Editor's UseOpenFailureOptions.
interface UseOpenFailureOptions| Member | Type | Summary |
|---|---|---|
| t? | ChromeTranslate | Your translation function for `message`. Without it, the root's `locale` gives it. |
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, so a late call cannot hide a newer refusal. |
| failure | DocumentOpenFailure | null | The refused open, or `null` when there is none or the person dismissed it. |
| kept | boolean | Whether the deck that was open before stays open. |
| message | string | null | The packaged, translated message for `failure`. |
UseParagraphFormatReturninterfaceSource ↗
What useParagraphFormat returns.
interface UseParagraphFormatReturn| Member | Type | Summary |
|---|---|---|
| apply | (update: ParagraphFormatCommand) => boolean | Write the given fields as ONE undo step. Returns whether the engine accepted them. |
| format | ParagraphFormatRead | null | The selected paragraphs' formatting, or null when no text is selected. |
| isEnabled | boolean | Whether the engine can write paragraph formatting now (text or a shape with text selected, editable). |
UsePptxSourceResultinterfaceSource ↗
What usePptxSource returns, as DOCX Editor's UseDocxSourceResult.
interface UsePptxSourceResult| Member | Type | Summary |
|---|---|---|
| document | Uint8Array | undefined | Bytes for the `document` prop; undefined until they arrive. |
| error | Error | null | Why the presentation could not be opened. A font failure never shows here. |
| fonts | FontConfiguration | FontResolver | undefined | What to give the `fonts` prop: a composed configuration on the eager path, a stable resolver on the on-demand path, or undefined until there is something to give. |
| isLoading | boolean | True until the presentation arrives or fails, and while eager fonts load. |
UseSlideshowReturninterfaceSource ↗
The slide show of the editor in PptxEditor.Root.
interface UseSlideshowReturn| Member | Type | Summary |
|---|---|---|
| controller | SlideshowController | null | The running show, or null. `PptxEditor.Slideshow` paints it. |
| start | | Start the show from the first shown slide or from the current slide. Does nothing without an open document with slides. Viewing mode can present. |
| stop | | Close the show. |
UseZoomResultinterfaceSource ↗
What [useZoom](useZoom) returns.
interface UseZoomResult| Member | Type | Summary |
|---|---|---|
| canZoomIn | boolean | Whether `zoomIn` can step. |
| canZoomOut | boolean | Whether `zoomOut` can step. |
| fit | () => void | Fit the slide to the window, and keep it fitted when the window changes size. |
| isFit | boolean | Whether the editor fits the slide to the window and follows its size. |
| levels | readonly number[] | The steps the zoom buttons move through, so a custom control shows the same levels. |
| reset | () => void | A fixed 100 %. |
| setZoom | (zoom: number) => void | Set a fixed zoom, kept in the range 10 % to 400 %. Leaves fit mode. |
| zoom | number | The zoom in force. 1 is 100 %. In fit mode it is the zoom that fits the slide. |
| zoomIn | () => void | One step of `levels` in from the zoom in force. Does nothing at 400 %. |
| zoomOut | () => void | One step of `levels` out from the zoom in force. Does nothing at 10 %. |
ZoomPillPropsinterfaceSource ↗
Props of ZoomPill.
interface ZoomPillProps| Member | Type | Summary |
|---|---|---|
| className? | string | A class name added to the pill. |
Type aliases (26)
BackgroundDialogFieldNametypeSource ↗
The field names of the Background dialog, for BackgroundDialog.Field: one per fill kind (SlideBackground['kind']), and Apply to all slides.
type BackgroundDialogFieldName = 'solid' | 'gradient' | 'pattern' | 'picture' | 'allSlides';BulletsAndNumberingDialogFieldNametypeSource ↗
The field names of the Bullets and Numbering dialog, for BulletsAndNumberingDialog.Field: the fields of a whole tab (bullet, number), or one field, named as its input: style, char, font, picture, sizePercent, and color on the Bulleted tab; numberStyle, numberSizePercent, numberColor, and startAt on the Numbered tab.
type BulletsAndNumberingDialogFieldName = 'bullet' | 'number' | 'style' | 'char' | 'font' | 'picture' | 'sizePercent' | 'color' | 'numberStyle' | 'numberSizePercent' | 'numberColor' | 'startAt';ColumnsDialogFieldNametypeSource ↗
The field names of the Columns dialog, for ColumnsDialog.Field: both fields (columns), or one of them, named as its ColumnsDialogFields key.
type ColumnsDialogFieldName = 'columns' | 'count' | 'spacing';ContextMenuNamedRowstypeSource ↗
The named rows of the canvas context menu (ContextMenu.Cut, ContextMenu.MergeCells, …), one per row of core's CONTEXT_MENU_NAMED_PARTS.
type ContextMenuNamedRows = {
readonly [K in ContextMenuPartName]: MenuRowPartComponent;
};EquationDialogFieldNametypeSource ↗
The field names of the Equation dialog, for EquationDialog.Field.
type EquationDialogFieldName = 'gallery' | 'linear';FontDialogFieldNametypeSource ↗
The field names of the Font dialog, for FontDialog.Field: a section of the Font tab (allText, effects) or one field, named as its FontDialogFields key, on either tab.
type FontDialogFieldName = 'allText' | 'effects' | 'fontFamily' | 'style' | 'size' | 'color' | 'underline' | 'underlineColor' | 'strike' | 'doubleStrike' | 'superscript' | 'offset' | 'subscript' | 'smallCaps' | 'allCaps' | 'spacing' | 'by' | 'kerning' | 'kerningAt';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;ImageAltTextDialogFieldNametypeSource ↗
The field names of the Alt Text dialog, for ImageAltTextDialog.Field.
type ImageAltTextDialogFieldName = 'description' | 'title' | 'decorative';ImagePropertiesDialogFieldNametypeSource ↗
The field names of the Format Picture dialog, for ImagePropertiesDialog.Field.
type ImagePropertiesDialogFieldName = 'size' | 'rotation' | 'crop';MenuNamedRowstypeSource ↗
The named rows of the menu bar (Menu.Cut, Menu.PageSetup, …), one per row of core's MENU_NAMED_PARTS. Put one in the menu that holds its row.
type MenuNamedRows = {
readonly [K in MenuRowPartName]: MenuRowPartComponent;
};PageSetupDialogFieldNametypeSource ↗
The field names of the Page setup dialog, for PageSetupDialog.Field.
type PageSetupDialogFieldName = 'slideSize' | 'theme' | 'fonts' | 'substitutes';ParagraphDialogFieldNametypeSource ↗
The field names of the Paragraph dialog, for ParagraphDialog.Field: a section (general, indentation, spacing) or one field in it, named as its ParagraphDialogFields key. A spacing field holds its unit list.
type ParagraphDialogFieldName = 'general' | 'indentation' | 'spacing' | 'alignment' | 'indentLeft' | 'special' | 'specialBy' | 'spaceBefore' | 'spaceAfter' | 'lineRule' | 'lineAt';PptxEditorDialogKeytypeSource ↗
The modal dialogs the registry mounts and useEditorDialog opens.
type PptxEditorDialogKey = 'pageSetup' | 'background' | 'paragraph' | 'font' | 'bulletsAndNumbering' | 'columns' | 'imageAltText' | 'imageProperties' | 'equation';PptxEditorPopuptypeSource ↗
A render callback for an automatic popup. false disables automatic rendering. Same shape as DOCX Editor's DocxEditorPopup.
type PptxEditorPopup<Props extends object> = false | ((props: Props) => ReactNode);ToolbarPartPropstypeSource ↗
Props for the named button parts (Toolbar.Bold, Toolbar.Undo, …), as DOCX Editor's: the slot is pinned, and children are icon content (icon, else children, else the registry icon), not a replacement. <Toolbar.Bold hidden /> is <Toolbar.Slot slotId="text.bold" hidden />.
type ToolbarPartProps = Omit<ToolbarSlotBaseProps, 'slotId'> & ({
readonly asChild: true;
readonly children: ReactElement;
} | {
readonly asChild?: false;
readonly children?: ReactNode;
});ToolbarSlotPropstypeSource ↗
Props for PptxEditor.Toolbar.Slot. With asChild, the single child element renders the control and receives its label, state, and click handler. Without it, children replace the control in its place.
type ToolbarSlotProps = ToolbarSlotBaseProps & ({
readonly asChild: true;
readonly children: ReactElement;
} | {
readonly asChild?: false;
readonly children?: ReactNode;
});UseBulletsAndNumberingDialogReturntypeSource ↗
The Bullets and Numbering draft and its actions, for a host's own field.
type UseBulletsAndNumberingDialogReturn = UseDialogReturn<BulletsDialogFields>;UseColumnsDialogReturntypeSource ↗
The Columns draft and its actions, for a host's own field inside the dialog.
type UseColumnsDialogReturn = UseDialogReturn<ColumnsDialogFields>;UseEditorHostDocumentReturntypeSource ↗
What useEditorHostDocument returns: the host document, or null with no DOM.
type UseEditorHostDocumentReturn = Document | null;UseEquationDialogReturntypeSource ↗
The Equation draft and its actions.
type UseEquationDialogReturn = UseDialogReturn<EquationDialogFields>;UseFontDialogReturntypeSource ↗
The Font draft and its actions, for a host's own field inside the dialog.
type UseFontDialogReturn = UseDialogReturn<FontDialogFields>;UseFontsReturntypeSource ↗
What useFonts returns: one marked resolver for the component's life. Named for the adapters' composable parity check (PPTX Editor addition).
type UseFontsReturn = MarkedFontResolver;UseImageAltTextDialogReturntypeSource ↗
The Alt Text draft and its actions.
type UseImageAltTextDialogReturn = UseDialogReturn<ImageAltTextDialogFields>;UseImagePropertiesDialogReturntypeSource ↗
The Format Picture draft and its actions.
type UseImagePropertiesDialogReturn = UseDialogReturn<ImagePropertiesDialogFields>;UsePageSetupDialogReturntypeSource ↗
The Page setup draft and its actions.
type UsePageSetupDialogReturn = UseDialogReturn<PageSetupDialogFields>;UseParagraphDialogReturntypeSource ↗
The Paragraph draft and its actions, for a host's own field inside the dialog.
type UseParagraphDialogReturn = UseDialogReturn<ParagraphDialogFields>;Variables (22)
BackgroundDialogconstSource ↗
Change the slide background, with replaceable parts (Header, Title, Body, Footer, Field, Error, Reset, Apply, Cancel).
BackgroundDialog: typeof BackgroundDialogRoot & {
Header: (props: DialogPartProps) => ReactNode;
Title: (props: DialogPartProps) => ReactNode;
Body: (props: DialogPartProps) => ReactNode;
Footer: (props: DialogPartProps) => ReactNode;
Field: (props: DialogPartProps & {
readonly name: BackgroundDialogFieldName;
}) => ReactNode;
Error: (props: DialogPartProps) => ReactNode;
Reset: (props: DialogPartProps) => ReactNode;
Apply: (props: DialogPartProps) => ReactNode;
Cancel: (props: DialogPartProps) => ReactNode;
}```tsx
<PptxEditor.BackgroundDialog {...props}>
<PptxEditor.BackgroundDialog.Field name="picture" hidden />
</PptxEditor.BackgroundDialog>
```BulletsAndNumberingDialogconstSource ↗
Format Bullets and Numbering: the bullet or numbering style, size, color, and start number of the selected paragraphs, applied as one undo step, with replaceable parts (Header, Title, Body, Footer, Field, Error, Apply, Cancel).
BulletsAndNumberingDialog: typeof BulletsAndNumberingDialogRoot & {
Header: (props: DialogPartProps) => ReactNode;
Title: (props: DialogPartProps) => ReactNode;
Body: (props: DialogPartProps) => ReactNode;
Footer: (props: DialogPartProps) => ReactNode;
Field: (props: DialogPartProps & {
readonly name: BulletsAndNumberingDialogFieldName;
}) => ReactNode;
Error: (props: DialogPartProps) => ReactNode;
Apply: (props: DialogPartProps) => ReactNode;
Cancel: (props: DialogPartProps) => ReactNode;
}ColumnsDialogconstSource ↗
Home Columns More Columns: the number of text columns of the selected shapes and the spacing between them, applied as one undo step, with replaceable parts (Header, Title, Body, Footer, Field, Error, Apply, Cancel).
ColumnsDialog: typeof ColumnsDialogRoot & {
Header: (props: DialogPartProps) => ReactNode;
Title: (props: DialogPartProps) => ReactNode;
Body: (props: DialogPartProps) => ReactNode;
Footer: (props: DialogPartProps) => ReactNode;
Field: (props: DialogPartProps & {
readonly name: ColumnsDialogFieldName;
}) => ReactNode;
Error: (props: DialogPartProps) => ReactNode;
Apply: (props: DialogPartProps) => ReactNode;
Cancel: (props: DialogPartProps) => ReactNode;
}EquationDialogconstSource ↗
Insert Equation and Edit Equation: a gallery of common equations and the linear form, with replaceable parts (Header, Title, Body, Footer, Field, Error, Apply, Cancel).
EquationDialog: typeof EquationDialogRoot & {
Header: (props: DialogPartProps) => ReactNode;
Title: (props: DialogPartProps) => ReactNode;
Body: (props: DialogPartProps) => ReactNode;
Footer: (props: DialogPartProps) => ReactNode;
Field: (props: DialogPartProps & {
readonly name: EquationDialogFieldName;
}) => ReactNode;
Error: (props: DialogPartProps) => ReactNode;
Apply: (props: DialogPartProps) => ReactNode;
Cancel: (props: DialogPartProps) => ReactNode;
}```tsx
<PptxEditor.EquationDialog {...props}>
<PptxEditor.EquationDialog.Field name="gallery" hidden />
</PptxEditor.EquationDialog>
```FontDialogconstSource ↗
Format Font: the font, style, size, underline, effects, character spacing, and kerning of the selected text, applied as one undo step, with replaceable parts (Header, Title, Body, Footer, Field, Error, Apply, Cancel).
FontDialog: typeof FontDialogRoot & {
Header: (props: DialogPartProps) => ReactNode;
Title: (props: DialogPartProps) => ReactNode;
Body: (props: DialogPartProps) => ReactNode;
Footer: (props: DialogPartProps) => ReactNode;
Field: (props: DialogPartProps & {
readonly name: FontDialogFieldName;
}) => ReactNode;
Error: (props: DialogPartProps) => ReactNode;
Apply: (props: DialogPartProps) => ReactNode;
Cancel: (props: DialogPartProps) => ReactNode;
}HyperLinkconstSource ↗
PptxEditor.HyperLink: the link popup with named parts.
HyperLink: HyperLinkNamespaceImageAltTextDialogconstSource ↗
Alt text of the selected element: description, title, and "Mark as decorative", with replaceable parts (Header, Title, Body, Footer, Field, Error, Apply, Cancel).
ImageAltTextDialog: typeof ImageAltTextDialogRoot & {
Header: (props: DialogPartProps) => ReactNode;
Title: (props: DialogPartProps) => ReactNode;
Body: (props: DialogPartProps) => ReactNode;
Footer: (props: DialogPartProps) => ReactNode;
Field: (props: DialogPartProps & {
readonly name: ImageAltTextDialogFieldName;
}) => ReactNode;
Error: (props: DialogPartProps) => ReactNode;
Apply: (props: DialogPartProps) => ReactNode;
Cancel: (props: DialogPartProps) => ReactNode;
}```tsx
<PptxEditor.ImageAltTextDialog {...props}>
<PptxEditor.ImageAltTextDialog.Field name="title" hidden />
</PptxEditor.ImageAltTextDialog>
```ImagePropertiesDialogconstSource ↗
Format Picture: size, rotation, and crop position of the selected picture, with replaceable parts (Header, Title, Body, Footer, Field, Error, Apply, Cancel).
ImagePropertiesDialog: typeof ImagePropertiesDialogRoot & {
Header: (props: DialogPartProps) => ReactNode;
Title: (props: DialogPartProps) => ReactNode;
Body: (props: DialogPartProps) => ReactNode;
Footer: (props: DialogPartProps) => ReactNode;
Field: (props: DialogPartProps & {
readonly name: ImagePropertiesDialogFieldName;
}) => ReactNode;
Error: (props: DialogPartProps) => ReactNode;
Apply: (props: DialogPartProps) => ReactNode;
Cancel: (props: DialogPartProps) => ReactNode;
}```tsx
<PptxEditor.ImagePropertiesDialog {...props}>
<PptxEditor.ImagePropertiesDialog.Field name="rotation" hidden />
</PptxEditor.ImagePropertiesDialog>
```LoadingconstSource ↗
Shows a slide-shaped sheet with a spinner while the editor has no deck, and while a deck opens; renders nothing once the deck is ready. A parse failure clears it, so a broken file never spins forever: report it from snapshot().error. Compose it inside a positioned box with overlay to cover the previous deck while the next one opens:
tsx
<PptxEditor.Root document={bytes}>
<PptxEditor.Viewport>
<div style={{ position: 'relative', flex: 1 }}>
<PptxEditor.Content />
<PptxEditor.Loading overlay />
</div>
</PptxEditor.Viewport>
</PptxEditor.Root>
Outside a PptxEditor.Root it always shows, because no editor reports otherwise.
Loading: LoadingComponentPageSetupDialogconstSource ↗
Page setup: slide size, appearance, and fonts, with replaceable parts (Header, Title, Body, Footer, Field, Error, Apply, Cancel).
PageSetupDialog: typeof PageSetupDialogRoot & {
Header: (props: DialogPartProps) => ReactNode;
Title: (props: DialogPartProps) => ReactNode;
Body: (props: DialogPartProps) => ReactNode;
Footer: (props: DialogPartProps) => ReactNode;
Field: (props: DialogPartProps & {
readonly name: PageSetupDialogFieldName;
}) => ReactNode;
Error: (props: DialogPartProps) => ReactNode;
Apply: (props: DialogPartProps) => ReactNode;
Cancel: (props: DialogPartProps) => ReactNode;
}```tsx
<PptxEditor.PageSetupDialog {...props}>
<PptxEditor.PageSetupDialog.Field name="substitutes" hidden />
<PptxEditor.PageSetupDialog.Apply className="acme-primary" />
</PptxEditor.PageSetupDialog>
```ParagraphDialogconstSource ↗
Format Paragraph: alignment, indents, spacing, and line spacing of the selected paragraphs, applied as one undo step, with replaceable parts (Header, Title, Body, Footer, Field, Error, Apply, Cancel).
ParagraphDialog: typeof ParagraphDialogRoot & {
Header: (props: DialogPartProps) => ReactNode;
Title: (props: DialogPartProps) => ReactNode;
Body: (props: DialogPartProps) => ReactNode;
Footer: (props: DialogPartProps) => ReactNode;
Field: (props: DialogPartProps & {
readonly name: ParagraphDialogFieldName;
}) => ReactNode;
Error: (props: DialogPartProps) => ReactNode;
Apply: (props: DialogPartProps) => ReactNode;
Cancel: (props: DialogPartProps) => ReactNode;
}```tsx
<PptxEditor.ParagraphDialog {...props}>
<PptxEditor.ParagraphDialog.Field name="indentation" hidden />
</PptxEditor.ParagraphDialog>
```PptxEditorconstSource ↗
The compound namespace plus the sugar component.
PptxEditor: react.ForwardRefExoticComponent<PptxEditorProps & react.RefAttributes<PptxEditorRef>> & {
Root: react.ForwardRefExoticComponent<PptxEditorRootProps & react.RefAttributes<PptxEditorRef>>;
Viewport: typeof PptxEditorViewport;
Content: typeof PptxEditorContent;
Toolbar: PptxEditorToolbarNamespace;
ToolbarControl: typeof ToolbarControl;
SlideRail: SlideRailNamespace;
SlideSorter: typeof SlideSorter;
NotesPane: typeof NotesPane;
ZoomPill: typeof ZoomPill;
SidePanel: typeof SidePanel;
SelectionPane: typeof SelectionPane;
FontNotice: (props: FontNoticeProps) => ReactNode;
EditNotice: (props: EditNoticeProps) => ReactNode;
OpenFailure: (props: PptxEditorOpenFailureProps) => ReactNode;
Loading: LoadingComponent;
PageSetupDialog: ((props: PageSetupDialogProps) => ReactNode) & {
Header: (props: DialogPartProps) => ReactNode;
Title: (props: DialogPartProps) => ReactNode;
Body: (props: DialogPartProps) => ReactNode;
Footer: (props: DialogPartProps) => ReactNode;
Field: (props: DialogPartProps & {
readonly name: PageSetupDialogFieldName;
}) => ReactNode;
Error: (props: DialogPartProps) => ReactNode;
Apply: (props: DialogPartProps) => ReactNode;
Cancel: (props: DialogPartProps) => ReactNode;
};
BackgroundDialog: ((props: BackgroundDialogProps) => ReactNode) & {
Header: (props: DialogPartProps) => ReactNode;
Title: (props: DialogPartProps) => ReactNode;
Body: (props: DialogPartProps) => ReactNode;
Footer: (props: DialogPartProps) => ReactNode;
Field: (props: DialogPartProps & {
readonly name: BackgroundDialogFieldName;
}) => ReactNode;
Error: (props: DialogPartProps) => ReactNode;
Reset: (props: DialogPartProps) => ReactNode;
Apply: (props: DialogPartProps) => ReactNode;
Cancel: (props: DialogPartProps) => ReactNode;
};
ImageAltTextDialog: ((props: ImageAltTextDialogProps) => ReactNode) & {
Header: (props: DialogPartProps) => ReactNode;
Title: (props: DialogPartProps) => ReactNode;
Body: (props: DialogPartProps) => ReactNode;
Footer: (props: DialogPartProps) => ReactNode;
Field: (props: DialogPartProps & {
readonly name: ImageAltTextDialogFieldName;
}) => ReactNode;
Error: (props: DialogPartProps) => ReactNode;
Apply: (props: DialogPartProps) => ReactNode;
Cancel: (props: DialogPartProps) => ReactNode;
};
ImagePropertiesDialog: ((props: ImagePropertiesDialogProps) => ReactNode) & {
Header: (props: DialogPartProps) => ReactNode;
Title: (props: DialogPartProps) => ReactNode;
Body: (props: DialogPartProps) => ReactNode;
Footer: (props: DialogPartProps) => ReactNode;
Field: (props: DialogPartProps & {
readonly name: ImagePropertiesDialogFieldName;
}) => ReactNode;
Error: (props: DialogPartProps) => ReactNode;
Apply: (props: DialogPartProps) => ReactNode;
Cancel: (props: DialogPartProps) => ReactNode;
};
EquationDialog: ((props: EquationDialogProps) => ReactNode) & {
Header: (props: DialogPartProps) => ReactNode;
Title: (props: DialogPartProps) => ReactNode;
Body: (props: DialogPartProps) => ReactNode;
Footer: (props: DialogPartProps) => ReactNode;
Field: (props: DialogPartProps & {
readonly name: EquationDialogFieldName;
}) => ReactNode;
Error: (props: DialogPartProps) => ReactNode;
Apply: (props: DialogPartProps) => ReactNode;
Cancel: (props: DialogPartProps) => ReactNode;
};
ParagraphDialog: (({ open, onClose, className, style, preset, children, }: ParagraphDialogProps) => ReactNode) & {
Header: (props: DialogPartProps) => ReactNode;
Title: (props: DialogPartProps) => ReactNode;
Body: (props: DialogPartProps) => ReactNode;
Footer: (props: DialogPartProps) => ReactNode;
Field: (props: DialogPartProps & {
readonly name: ParagraphDialogFieldName;
}) => ReactNode;
Error: (props: DialogPartProps) => ReactNode;
Apply: (props: DialogPartProps) => ReactNode;
Cancel: (props: DialogPartProps) => ReactNode;
};
FontDialog: (({ open, onClose, className, style, preset, children, }: FontDialogProps) => ReactNode) & {
Header: (props: DialogPartProps) => ReactNode;
Title: (props: DialogPartProps) => ReactNode;
Body: (props: DialogPartProps) => ReactNode;
Footer: (props: DialogPartProps) => ReactNode;
Field: (props: DialogPartProps & {
readonly name: FontDialogFieldName;
}) => ReactNode;
Error: (props: DialogPartProps) => ReactNode;
Apply: (props: DialogPartProps) => ReactNode;
Cancel: (props: DialogPartProps) => ReactNode;
};
BulletsAndNumberingDialog: (({ open, onClose, className, style, preset, children, }: BulletsAndNumberingDialogProps) => ReactNode) & {
Header: (props: DialogPartProps) => ReactNode;
Title: (props: DialogPartProps) => ReactNode;
Body: (props: DialogPartProps) => ReactNode;
Footer: (props: DialogPartProps) => ReactNode;
Field: (props: DialogPartProps & {
readonly name: BulletsAndNumberingDialogFieldName;
}) => ReactNode;
Error: (props: DialogPartProps) => ReactNode;
Apply: (props: DialogPartProps) => ReactNode;
Cancel: (props: DialogPartProps) => ReactNode;
};
ColumnsDialog: (({ open, onClose, className, style, preset, children, }: ColumnsDialogProps) => ReactNode) & {
Header: (props: DialogPartProps) => ReactNode;
Title: (props: DialogPartProps) => ReactNode;
Body: (props: DialogPartProps) => ReactNode;
Footer: (props: DialogPartProps) => ReactNode;
Field: (props: DialogPartProps & {
readonly name: ColumnsDialogFieldName;
}) => ReactNode;
Error: (props: DialogPartProps) => ReactNode;
Apply: (props: DialogPartProps) => ReactNode;
Cancel: (props: DialogPartProps) => ReactNode;
};
Slideshow: typeof Slideshow;
FindBar: (props: FindBarProps) => ReactNode;
HyperLink: HyperLinkNamespace;
Menu: MenuNamespace;
ContextMenu: ContextMenuNamespace;
Ribbon: RibbonNamespace;
StatusBar: StatusBarNamespace;
}PptxEditorContextconstSource ↗
The editor instance published by PptxEditor.Root.
PptxEditorContext: react.Context<PptxEditorInstance | null>PptxEditorContextMenuconstSource ↗
The slide canvas's context menu (PptxEditor.ContextMenu), with DOCX Editor's parts (Slot, Item, Group, Separator, Submenu). Place it in the root or the viewport, or render it in popups.contextMenu.
PptxEditorContextMenu: ContextMenuNamespacePptxEditorMenuconstSource ↗
The menu bar (PptxEditor.Menu): File, Edit, View, Insert, Format, Arrange, and Slide Show, with DOCX Editor's parts (Entry, Item, Row, Group, Separator, Submenu) and one named part per menu (Menu.File, …).
PptxEditorMenu: MenuNamespacePptxEditorRibbonconstSource ↗
The ribbon (PptxEditor.Ribbon): the reference PDF's tabs over the toolbar's groups, with the Quick Access Toolbar and contextual tabs. Each tab panel takes toolbar children (Toolbar.Slot, named parts, Toolbar.Group, Toolbar.Action) through Ribbon.Tab.
PptxEditorRibbon: RibbonNamespacePptxEditorRootconstSource ↗
Owns the editor instance. Takes a ref to a PptxEditorRef.
PptxEditorRoot: react.ForwardRefExoticComponent<PptxEditorRootProps & react.RefAttributes<PptxEditorRef>>PptxEditorStatusBarconstSource ↗
The status bar (PptxEditor.StatusBar): slide x of y, the Notes button, the view switch, and the zoom pill.
PptxEditorStatusBar: StatusBarNamespaceSlideRailconstSource ↗
The slide rail (PptxEditor.SlideRail) with its action parts: a named part child replaces its button, hidden removes it, other children go after Delete, and preset={false} renders only the children.
SlideRail: SlideRailNamespaceSlideshowContextconstSource ↗
The slide show published by PptxEditor.Root.
SlideshowContext: react.Context<UseSlideshowReturn>ToolbarconstSource ↗
The toolbar, with its parts: Toolbar.Slot changes or replaces one registered control, Toolbar.Group changes a built-in group or adds a host group, Toolbar.Action is a host's own button, and the named parts (Toolbar.Bold, Toolbar.FontFamily, …) stand for one slot each.
Toolbar: PptxEditorToolbarNamespaceToolbarContextconstSource ↗
The nearest compound's t.
ToolbarContext: react.Context<ToolbarContextValue>