Speaker Notes and Transitions
Speaker notes and transitions are stored in the Slides snapshot and updated through commands, so they stay 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. Notes belong to one slide and are not rendered as page elements.
Slide transitions
TypeScript
slide?.setTransition({ type: univerAPI.Enum.SlideTransitionTypeEnum.Push, direction: univerAPI.Enum.SlideTransitionDirectionEnum.Right, duration: 700,})getTransition() returns the transition resolved for that slide. Direction is preserved only by transition types that support it.
Apply one transition to every slide when the deck should use a consistent effect:
TypeScript
presentation?.applyTransitionToAll({ type: univerAPI.Enum.SlideTransitionTypeEnum.Fade, duration: 500,})Call slide.setTransition(undefined) to clear a slide-specific transition. Playback consumes the resolved transition described in Presentation Mode.
How is this guide?