ReferenceAPI
Recording
Every change as a step: undo, redo and replay.
Every change as a step: undo, redo and replay. The same text agents read through help().
recording.apply
Section titled “recording.apply”apply(ops: Op[]): Array<string | Locator | undefined>Applies ops sent as JSON, as one undo step: { target: "sl_7Q2M4K9A.shapes", op: "add", args: [{ … }] }.
An argument { $result: n } stands for what op n of this batch returned. Returns each op’s result
as an anchor (or locator) when it is an object.
Options: Op.
{ target: "sl_7Q2M4K9A.shapes", op: "add", args: [{ … }] }{ $result: n }recording.canRedo
Section titled “recording.canRedo”canRedo: booleanSteps that were undone and can be redone.
recording.canUndo
Section titled “recording.canUndo”canUndo: booleanSteps that can be undone (creating the deck is not one of them).
recording.deck
Section titled “recording.deck”deck: DeckThe recorded deck. Use it like any deck; every change is logged.
recording.group
Section titled “recording.group”group(fn: () => T): TRuns fn as one undo step, e.g. a whole composed slide.
recording.redo
Section titled “recording.redo”redo(): booleanRedoes the step undone last.
recording.toJSON
Section titled “recording.toJSON”toJSON(): OpLogJSONThe log as JSON: store it, send it, or rebuild the deck with Recording.from().
recording.undo
Section titled “recording.undo”undo(): booleanUndoes the last step. Objects you hold keep working; ones the step created are gone.