Lifecycle
onBeforeCreate
Called before the editor view is created.
onCreate
Called when editor is fully initialized and ready.
onDestroy
Called when editor is being destroyed. Clean up resources here.
onFirstRender
Called after the first render completes.
Content
onUpdate
Called when document content changes.
onContentError
Called when content processing fails.
Selection
onSelectionUpdate
Called when selection changes (cursor movement).
onFocus
Called when editor gains focus.
onBlur
Called when editor loses focus.
Subscribing after initialization
Useeditor.on(...) and editor.off(...) to subscribe to events at any time after the editor is created. This is useful for adding listeners from external code that does not control the initial configuration.
Constructor callbacks like
onUpdate and runtime subscriptions like editor.on('update', ...) both fire on the same events. Use constructor callbacks when the listener is known at creation time, and editor.on(...) when adding listeners dynamically.
