Skip to content
QuireKit
PPTX Editor docs
v0.3.1

Session and commands

Read the selection and content from scripts, change slides, and keep every change in the undo history.

Session commands take the same editing path as the interface: each call is one undoable edit and the interface updates at once. See Open and save for getting the session.

Call commands

ts

Each command takes one options object and returns whether it applied. When it does not apply, for example because the slide or shape does not exist, it returns false and the deck is unchanged.

Combine several steps into one undo step with chain(); if any step does not apply, none of them is kept:

ts

Find slides and shapes

Commands address slides by part name (such as /ppt/slides/slide3.xml) and shapes by id, which stay valid when slides move.

The shapes the user selected come from selection():

ts

To walk every slide, read the current content with the MIT package @quirekit/office-kit-pptx:

ts

Units

Positions and sizes are in EMU: 1 inch = 914400, 1 cm = 360000, 1 pt = 12700. A 16:9 slide is 12192000 wide and 6858000 high by default. Font sizes are in points and colors are written #RRGGBB.

Common commands

UseCommands
SlidesaddSlide, duplicateSlide, moveSlide, deleteSlide, setSlideHidden, setSlideNotes, setSlideLayout, setSlideBackground
TextsetShapeText, replaceShapeText, setTextFormat, setTextAlignment, setTextAnchor, setParagraphBullets, setLineSpacing
InsertaddTextBox, addShape, addPicture, addTable, addChart, addMedia, addEquation, addFreeform
ShapessetShapeBounds, moveShapes, setShapeFill, setShapeOutline, rotateShapes, flipShapes, deleteShape, duplicateShapes
ArrangearrangeShapes, alignShapes, distributeShapes, groupShapes, ungroupShapes
Tables and chartssetTableCellText, setTableStyle, setChartData
Transitions and animationssetSlideTransition, addShapeAnimation, updateAnimation, removeAnimation, moveAnimation
LinkssetShapeLink

The types list every command and its options: type session.commands. in your editor to see them with their descriptions.

ts
QuireKit · © 2026 上海轻书远行信息科技有限公司QuireKit · Core, plugins, Classic, PPTX Editor and Sheets docs