API reference / Common / Engine types / SlideCommand
Type Alias: SlideCommand
ts
type SlideCommand =
| {
insertSlide: {
index: number;
layout?: SlideLayoutId;
slideSection?: SlideSectionId;
};
}
| {
deleteSlides: {
ids: SlideId[];
};
}
| {
reorderSlides: {
ids: SlideId[];
to: number;
slideSection?: SlideSectionId;
};
}
| {
duplicateSlides: {
ids: SlideId[];
to: number;
};
}
| {
setSlidesShow: {
ids: SlideId[];
show: boolean;
};
};An edit intent on the presentation's slides — the EditSlide wrapping it, the analogue of portable's PageCommand (InsertSlide layout-aware, where a page has no template). Slides are addressed by id; ids not in the presentation are skipped. Where a slide lands is an index into the slide order, and in a deck with sections, the section it joins is the one of the slide it lands behind, or slide_section where the command names one. Each command commits once, so the whole command is one undo step.