Skip to Content

Type Alias: EditorCommand

All commands accepted by the high-level apply and applyAll APIs.

Each union member is discriminated by kind. TypeDoc expands the command interfaces here so consumers of the pptx-glimpse re-export can inspect every payload without importing the lower-level editor package.

Commands

replaceTextRunPlainText

{ kind: "replaceTextRunPlainText"; handle: SourceHandle; text: string; }

replaceParagraphPlainText

{ kind: "replaceParagraphPlainText"; handle: SourceHandle; text: string; }

setTextRunProperties

{ kind: "setTextRunProperties"; handle: SourceHandle; properties: { bold?: boolean; color?: { hex: string; kind: "srgb"; }; fontSize?: Pt; italic?: boolean; typeface?: string; underline?: boolean; }; }

clearTextRunProperties

{ kind: "clearTextRunProperties"; handle: SourceHandle; properties: readonly ("bold" | "italic" | "underline" | "fontSize" | "color" | "typeface")[]; }

setParagraphProperties

{ kind: "setParagraphProperties"; handle: SourceHandle; properties: { align?: SourceTextAlign; bullet?: SourceBulletType; level?: number; }; }

clearParagraphProperties

{ kind: "clearParagraphProperties"; handle: SourceHandle; properties: readonly ("align" | "level" | "bullet")[]; }

moveShape

{ kind: "moveShape"; handle: SourceHandle; offsetX: Emu; offsetY: Emu; }

resizeShape

{ kind: "resizeShape"; handle: SourceHandle; height: Emu; width: Emu; }

setShapeTransform

{ kind: "setShapeTransform"; handle: SourceHandle; height: Emu; offsetX: Emu; offsetY: Emu; width: Emu; }

setShapeFill

{ kind: "setShapeFill"; fill: | { kind: "none"; } | { color: { hex: string; kind: "srgb"; }; kind: "solid"; }; handle: SourceHandle; }

setShapeOutline

{ kind: "setShapeOutline"; handle: SourceHandle; outline: { fill?: | { kind: "none"; } | { color: { hex: string; kind: "srgb"; }; kind: "solid"; }; width?: Emu; }; }

addTextBox

{ kind: "addTextBox"; body?: { anchor?: SourceVerticalAnchor; autoFit?: "shape"; marginBottom?: Emu; marginLeft?: Emu; marginRight?: Emu; marginTop?: Emu; }; height: Emu; name?: string; offsetX: Emu; offsetY: Emu; paragraphs?: readonly { properties?: { align?: SourceTextAlign; bullet?: TextBoxBulletInput; indent?: Emu; lineSpacing?: TextBoxLineSpacingInput; marginLeft?: Emu; }; runs: readonly { hyperlink?: string; properties?: { baseline?: TextBoxBaselineInput; bold?: boolean; charSpacing?: number; color?: AuthoringColorInput; fontFace?: string; fontSize?: Pt; glow?: TextBoxGlowInput; gradientFill?: TextBoxGradientFillInput; highlight?: AuthoringColorInput; italic?: boolean; outline?: TextBoxOutlineInput; strike?: boolean; underline?: boolean | TextBoxUnderlineInput; }; text: string; }[]; }[]; rotation?: OoxmlAngle; slideHandle: SourceHandle; text?: string; width: Emu; }

addConnector

{ kind: "addConnector"; end?: { connectionSiteIndex: number; shapeHandle: SourceHandle; }; flipHorizontal?: boolean; flipVertical?: boolean; height: Emu; name?: string; offsetX: Emu; offsetY: Emu; outline?: { dash?: SourceDashStyle; fill?: | { kind: "none"; } | { color: AuthoringColorInput; kind: "solid"; } | { kind: "gradient"; } & TextBoxLinearGradientFillInput | { kind: "gradient"; } & TextBoxRadialGradientFillInput; headEnd?: SourceArrowEndpoint; tailEnd?: SourceArrowEndpoint; width?: Emu; }; preset: "straightConnector1" | "bentConnector3" | "curvedConnector3"; slideHandle: SourceHandle; start?: { connectionSiteIndex: number; shapeHandle: SourceHandle; }; width: Emu; }

deleteShape

{ kind: "deleteShape"; handle: SourceHandle; }

groupShapes

{ kind: "groupShapes"; shapeHandles: readonly SourceHandle[]; }

moveShapes

{ kind: "moveShapes"; beforeShapeHandle?: SourceHandle; destinationHandle: SourceHandle; shapeHandles: readonly SourceHandle[]; }

moveShapesAcrossSlides

{ kind: "moveShapesAcrossSlides"; beforeShapeHandle?: SourceHandle; destinationSlideHandle: SourceHandle; shapeHandles: readonly SourceHandle[]; }

ungroupShape

{ kind: "ungroupShape"; groupHandle: SourceHandle; }

replaceImage

{ kind: "replaceImage"; bytes: Uint8Array; handle: SourceHandle; }

setPictureCrop

{ kind: "setPictureCrop"; bottom?: OoxmlPercent; handle: SourceHandle; left?: OoxmlPercent; right?: OoxmlPercent; top?: OoxmlPercent; }

clearPictureCrop

{ kind: "clearPictureCrop"; handle: SourceHandle; }

updateChartData

{ kind: "updateChartData"; handle: SourceHandle; series: readonly UpdateChartSeriesDataInput[]; }

updateScatterChartData

{ kind: "updateScatterChartData"; handle: SourceHandle; series: readonly UpdateScatterChartSeriesDataInput[]; }

updateBubbleChartData

{ kind: "updateBubbleChartData"; handle: SourceHandle; series: readonly UpdateBubbleChartSeriesDataInput[]; }

addEmptySlideFromLayout

{ kind: "addEmptySlideFromLayout"; layoutPartPath: PartPath; }

duplicateSlide

{ kind: "duplicateSlide"; handle: SourceHandle; }

moveSlide

{ kind: "moveSlide"; handle: SourceHandle; toIndex: number; }

handle

readonly handle: SourceHandle;

kind

readonly kind: "moveSlide";

toIndex

readonly toIndex: number;

Zero-based final slide index.


deleteSlide

{ kind: "deleteSlide"; handle: SourceHandle; }

updateThemeScheme

{ kind: "updateThemeScheme"; colorScheme?: UpdateThemeColorSchemeInput; fontScheme?: UpdateThemeFontSchemeInput; handle: SourceHandle; }