Speaker Notes and Transitions
Speaker notes and transitions are stored in the Slides snapshot, and they are updated through commands. This keeps them synchronized with undo and redo.
Speaker notes
TypeScript
const presentation = univerAPI.getActivePresentation()const slide = presentation?.getActiveSlide()if (slide) { slide.setSpeakerNotes('Emphasize the year-over-year change.') console.log(slide.getSpeakerNotes())}Call setSpeakerNotes(undefined) to clear the notes. A note belongs to a single slide and is never rendered as a page element.
Slide transitions
TypeScript
slide?.setTransition({ type: univerAPI.Enum.SlideTransitionTypeEnum.Push, direction: univerAPI.Enum.SlideTransitionDirectionEnum.Right, duration: 700,})getTransition() returns the resolved transition for that slide. Only transition types that support a direction preserve the configured direction.
To apply the same effect to every slide, set one transition for all slides:
TypeScript
presentation?.applyTransitionToAll({ type: univerAPI.Enum.SlideTransitionTypeEnum.Fade, duration: 500,})Call slide.setTransition(undefined) to clear a transition set on a single slide. Playback uses the resolved transition described in Presentation Mode.
How is this guide?