diff --git a/packages/model/src/EditorJSModel.ts b/packages/model/src/EditorJSModel.ts index 44b2a8c5..c46ddf18 100644 --- a/packages/model/src/EditorJSModel.ts +++ b/packages/model/src/EditorJSModel.ts @@ -7,6 +7,11 @@ import { BaseDocumentEvent } from './utils/EventBus/events/BaseEvent.js'; import type { Constructor } from './utils/types.js'; import { CaretManager } from './caret/index.js'; +export interface EditorJSModel { + addEventListener(type: EventType.Changed, listener: (event: ModelEvents[K]) => void): void; + addEventListener(type: EventType.CaretUpdated, listener: (event: CaretUpdatedEvent) => void): void; +} + /** * EditorJSModel is a wrapper around EditorDocument that prevent access to internal structures */ diff --git a/packages/playground/src/App.vue b/packages/playground/src/App.vue index 909563ed..07d9be55 100644 --- a/packages/playground/src/App.vue +++ b/packages/playground/src/App.vue @@ -1,6 +1,6 @@