import { Extension } from "@tiptap/core"; import { EditorView } from "@tiptap/pm/view"; //#region src/extensions/core/view-event-handlers.d.ts /** * The options available to customize the `ViewEventHandlers` extension. * * If more view handlers are needed, please look into the available event handlers in * [`prosemirror-view`](https://prosemirror.net/docs/ref/#view.Props), and add them below. */ type ViewEventHandlersOptions = { /** * Called when the editor is clicked, after `handleClickOn` handlers have been called. */ onClick?: (event: MouseEvent, view: EditorView, pos: number) => boolean | void; /** * Called when the editor receives a `keydown` event. */ onKeyDown?: (event: KeyboardEvent, view: EditorView) => boolean | void; }; /** * The `ViewEventHandlers` extension allows handling of various ProseMirror view events. * * The various event-handling functions may all return `true` to indicate that they handled the * given event. The view will then take care to call `preventDefault` on the event, except with * `handleDOMEvents`, where the handler itself is responsible for that. Return `false` or * `undefined` for the default event handler to be called. * * These event handlers should be used sparingly, please consider if a reusable extension would be * more appropriate for your use case. */ //#endregion export { type ViewEventHandlersOptions }; //# sourceMappingURL=view-event-handlers.d.ts.map