@@ -69,6 +69,7 @@ import {
6969 * @property {() => void } [onPdfDocumentReady] Callback when the PDF document is ready
7070 * @property {(isOpened: boolean) => void } [onSidebarToggle] Callback when the sidebar is toggled
7171 * @property {(params: { editor: Editor }) => void } [onCollaborationReady] Callback when collaboration is ready
72+ * @property {(params: { editor: Editor }) => void } [onEditorUpdate] Callback when document is updated
7273 * @property {(params: { error: Exception }) => void } [onException] Callback when an exception is thrown
7374 */
7475
@@ -129,6 +130,7 @@ export class SuperDoc extends EventEmitter {
129130 onPdfDocumentReady : ( ) => null ,
130131 onSidebarToggle : ( ) => null ,
131132 onCollaborationReady : ( ) => null ,
133+ onEditorUpdate : ( ) => null ,
132134 onCommentsListChange : ( ) => null ,
133135 onException : ( ) => null ,
134136
@@ -229,6 +231,7 @@ export class SuperDoc extends EventEmitter {
229231 this . on ( 'pdf-document-ready' , this . config . onPdfDocumentReady ) ;
230232 this . on ( 'sidebar-toggle' , this . config . onSidebarToggle ) ;
231233 this . on ( 'collaboration-ready' , this . config . onCollaborationReady ) ;
234+ this . on ( 'editor-update' , this . config . onEditorUpdate ) ;
232235 this . on ( 'content-error' , this . onContentError ) ;
233236 this . on ( 'exception' , this . config . onException ) ;
234237 }
0 commit comments