Subscribing to events
Lifecycle events
ready
Fired when SuperDoc is fully initialized.
editorBeforeCreate
Fired before an editor is created. Use this to configure extensions or set up services.
editorCreate
When an editor is created.
editorDestroy
When an editor is destroyed.
Content events
editor-update
When editor content changes.
content-error
When content processing fails.
fonts-resolved
When document fonts are resolved.
Comments events
comments-update
When comments are modified.
Collaboration events
collaboration-ready
When collaboration is initialized.
awareness-update
When user presence changes.
locked
When document lock state changes.
UI events
sidebar-toggle
When the comments sidebar is toggled.
Error events
exception
When an error occurs during document processing or runtime.
Configuration-based events
Events can also be set during initialization:Event order
editorBeforeCreate— Before editor mountseditorCreate— Editor readyready— All editors readycollaboration-ready— If collaboration enabled- Runtime events (
editor-update,comments-update,sidebar-toggle, etc.) editorDestroy— Cleanup

