Class: PptxEditorSession
Headless read/edit/render/write session using the browser renderer.
Extends
PptxEditorSession
Accessors
document
Get Signature
get document(): PptxSourceModel;Current immutable PPTX source model after all applied history entries.
Returns
Inherited from
BasePptxEditorSession.documenthistory
Get Signature
get history(): PptxEditorHistoryState;Current undo/redo availability and stack depths.
Returns
Inherited from
BasePptxEditorSession.historylayoutCatalog
Get Signature
get layoutCatalog(): readonly PptxEditorSlideMasterCatalogEntry[];Slide masters and their layouts in PowerPoint authoring order.
The outer array follows p:sldMasterIdLst; each nested array follows the corresponding
p:sldLayoutIdLst. Only resolved catalog entries are returned. Inspect
document.diagnostics for unresolved relationships.
Returns
readonly PptxEditorSlideMasterCatalogEntry[]
Inherited from
BasePptxEditorSession.layoutCatalogselection
Get Signature
get selection():
| PptxEditorSelectionInfo
| undefined;Currently selected shape, or undefined when no shape is selected.
Returns
| PptxEditorSelectionInfo
| undefined
Inherited from
BasePptxEditorSession.selectionslides
Get Signature
get slides(): readonly PptxEditorSlideSvg[];Latest rendered SVG result for every slide.
Returns
readonly PptxEditorSlideSvg[]
Inherited from
BasePptxEditorSession.slidesMethods
addConnector()
addConnector(slideNumber?: number, options?: PptxEditorAddConnectorOptions): Promise<PptxEditorSlidesResponse>;Add and select a straight connector on one slide.
Parameters
slideNumber?
number = 1
PowerPoint-style 1-based slide number.
options?
PptxEditorAddConnectorOptions = {}
Pixel bounds and optional shape name.
Returns
Promise<PptxEditorSlidesResponse>
Updated editor state.
Throws
PptxEditorError with invalid-command or render-failed.
Inherited from
BasePptxEditorSession.addConnectoraddTextBox()
addTextBox(slideNumber?: number, options?: PptxEditorAddTextBoxOptions): Promise<PptxEditorSlidesResponse>;Add and select a text box on one slide.
Parameters
slideNumber?
number = 1
PowerPoint-style 1-based slide number.
options?
PptxEditorAddTextBoxOptions = {}
Pixel bounds, initial text, and optional shape name.
Returns
Promise<PptxEditorSlidesResponse>
Updated editor state.
Throws
PptxEditorError with invalid-command or render-failed.
Inherited from
BasePptxEditorSession.addTextBoxapply()
apply(command: EditorCommand): Promise<PptxEditorSlidesResponse>;Apply one EditorCommand as one atomic history entry.
Parameters
command
Discriminated command containing its kind and payload.
Returns
Promise<PptxEditorSlidesResponse>
Updated slides, history, selection, and any non-fatal warnings.
Throws
PptxEditorError with invalid-command or render-failed.
Inherited from
BasePptxEditorSession.applyapplyAll()
applyAll(commands: readonly EditorCommand[]): Promise<PptxEditorSlidesResponse>;Apply commands atomically as one history entry and rerender affected slides.
Parameters
commands
readonly EditorCommand[]
Ordered editor commands. An empty array returns the current state unchanged.
Returns
Promise<PptxEditorSlidesResponse>
Updated slides, history, selection, and any non-fatal warnings.
Throws
PptxEditorError with invalid-command or render-failed.
Inherited from
BasePptxEditorSession.applyAlldeleteSelectedShape()
deleteSelectedShape(): Promise<PptxEditorSlidesResponse>;Delete the currently selected supported root or nested drawing.
Returns
Promise<PptxEditorSlidesResponse>
Updated editor state.
Throws
PptxEditorError with invalid-selection, invalid-command, or
render-failed.
Inherited from
BasePptxEditorSession.deleteSelectedShapedeleteShape()
deleteShape(handle: SourceHandle): Promise<PptxEditorSlidesResponse>;Delete a supported root or nested drawing by stable source handle.
Parameters
handle
Handle returned by shapes.
Returns
Promise<PptxEditorSlidesResponse>
Updated editor state.
Throws
PptxEditorError with invalid-command or render-failed.
Inherited from
BasePptxEditorSession.deleteShapegroupShapes()
groupShapes(shapeHandles: readonly SourceHandle[]): Promise<PptxEditorSlidesResponse>;Group consecutive sibling drawings and select the new native group.
Parameters
shapeHandles
readonly SourceHandle[]
Stable handles in any order; document order determines group child order.
Returns
Promise<PptxEditorSlidesResponse>
Updated editor state with the new group selected.
Throws
PptxEditorError with invalid-command or render-failed.
Inherited from
BasePptxEditorSession.groupShapesmoveShapes()
moveShapes(
shapeHandles: readonly SourceHandle[],
destinationHandle: SourceHandle,
options?: {
beforeShapeHandle?: SourceHandle;
}): Promise<PptxEditorSlidesResponse>;Move consecutive sibling drawings to a root/native-group destination in the same part. Identity-mapped ancestor chains preserve each moved drawing’s rendered transform.
Parameters
shapeHandles
readonly SourceHandle[]
destinationHandle
options?
beforeShapeHandle?
Returns
Promise<PptxEditorSlidesResponse>
Inherited from
BasePptxEditorSession.moveShapesmoveShapesAcrossSlides()
moveShapesAcrossSlides(
shapeHandles: readonly SourceHandle[],
destinationSlideHandle: SourceHandle,
options?: {
beforeShapeHandle?: SourceHandle;
}): Promise<PptxEditorSlidesResponse>;Move consecutive non-placeholder shape/picture/connector roots to another slide.
Parameters
shapeHandles
readonly SourceHandle[]
destinationSlideHandle
options?
beforeShapeHandle?
Returns
Promise<PptxEditorSlidesResponse>
Inherited from
BasePptxEditorSession.moveShapesAcrossSlidespreviewLayoutCatalogTarget()
previewLayoutCatalogTarget(handle: SourceHandle): Promise<PptxEditorTemplatePreviewResult>;Render exactly one ordered-catalog master or layout without modifying editor state.
Missing and ambiguous handles are returned as stable failures. Unsupported render content is
skipped and reported through stable conversion diagnostics. Runtime renderer failures use the
existing PptxEditorError render-failed integration contract.
Parameters
handle
Returns
Promise<PptxEditorTemplatePreviewResult>
Inherited from
BasePptxEditorSession.previewLayoutCatalogTargetredo()
redo(): Promise<PptxEditorSlidesResponse>;Reapply the latest undone history entry.
Returns
Promise<PptxEditorSlidesResponse>
Updated editor state.
Throws
PptxEditorError with empty-redo-stack or render-failed.
Inherited from
BasePptxEditorSession.redorenderCurrentSlides()
renderCurrentSlides(): Promise<readonly PptxEditorSlideSvg[]>;Rerender all current slides using the session render options.
Returns
Promise<readonly PptxEditorSlideSvg[]>
The updated SVG slide cache.
Throws
PptxEditorError with render-failed.
Inherited from
BasePptxEditorSession.renderCurrentSlidesresponse()
response(warnings?: readonly EditorCommandWarning[]): PptxEditorSlidesResponse;Build a snapshot of the current rendered, history, selection, and warning state.
Parameters
warnings?
readonly EditorCommandWarning[]
Optional warnings emitted by the operation that produced the state.
Returns
The current public editor response.
Inherited from
BasePptxEditorSession.responsesave()
save(): PptxEditorSaveResponse;Serialize and validate the current document as PPTX bytes.
Returns
Serialized bytes and current history state.
Throws
PptxEditorError with write-failed.
Inherited from
BasePptxEditorSession.saveselectShape()
selectShape(handle: SourceHandle): PptxEditorSlidesResponse;Select a shape without changing the document or history.
Parameters
handle
Handle returned by shapes.
Returns
Updated editor state.
Throws
PptxEditorError with invalid-selection.
Inherited from
BasePptxEditorSession.selectShapeshapes()
shapes(slideNumber: number): readonly PptxEditorShapeInfo[];Inspect editable shape capabilities for one slide.
Parameters
slideNumber
number
PowerPoint-style 1-based slide number.
Returns
readonly PptxEditorShapeInfo[]
Shape information, or an empty array when the slide does not exist.
Inherited from
BasePptxEditorSession.shapesundo()
undo(): Promise<PptxEditorSlidesResponse>;Restore the document before the latest history entry.
Returns
Promise<PptxEditorSlidesResponse>
Updated editor state.
Throws
PptxEditorError with empty-undo-stack or render-failed.
Inherited from
BasePptxEditorSession.undoungroupShape()
ungroupShape(groupHandle: SourceHandle): Promise<PptxEditorSlidesResponse>;Expand one losslessly ungroupable native group and select its first child in document order.
Parameters
groupHandle
Stable handle of the native group.
Returns
Promise<PptxEditorSlidesResponse>
Updated editor state with the first expanded child selected.
Throws
PptxEditorError with invalid-command or render-failed.
Inherited from
BasePptxEditorSession.ungroupShapeupdateThemeScheme()
updateThemeScheme(themeHandle: SourceHandle, input: UpdateThemeSchemeInput): Promise<PptxEditorSlidesResponse>;Update selected color/font fields on one existing theme and rerender its master slides.
Parameters
themeHandle
input
Returns
Promise<PptxEditorSlidesResponse>
Inherited from
BasePptxEditorSession.updateThemeSchemecreate()
static create(input: Uint8Array, renderOptions?: PptxEditorRenderOptions): Promise<PptxEditorSession>;Parse PPTX bytes, create a session, and render its initial slides.
Parameters
input
Uint8Array
PPTX binary data.
renderOptions?
Options reused for editor SVG rendering.
Returns
Promise<PptxEditorSession>
An initialized editor session.
Throws
PptxEditorError with read-failed or render-failed.
Overrides
BasePptxEditorSession.create