import type { EditOptions } from './EditOptions'; import type { EditorPlugin, IEditor, PluginEvent } from 'roosterjs-content-model-types'; /** * Edit plugins helps editor to do editing operation on top of content model. * This includes: * 1. Delete Key * 2. Backspace Key * 3. Tab Key */ export declare class EditPlugin implements EditorPlugin { private editor; private disposer; private shouldHandleNextInputEvent; private selectionAfterDelete; private options; /** * @param options An optional parameter that takes in an object of type EditOptions, which includes the following properties: * handleTabKey: A boolean or HandleTabOptions object that controls Tab key handling. When a boolean, true enables all features and false disables all. When an object, individual features can be controlled. Defaults to all enabled. */ constructor(options?: EditOptions); /** * Get name of this plugin */ getName(): string; /** * The first method that editor will call to a plugin when editor is initializing. * It will pass in the editor instance, plugin should take this chance to save the * editor reference so that it can call to any editor method or format API later. * @param editor The editor object */ initialize(editor: IEditor): void; /** * The last method that editor will call to a plugin before it is disposed. * Plugin can take this chance to clear the reference to editor. After this method is * called, plugin should not call to any editor method since it will result in error. */ dispose(): void; /** * Core method for a plugin. Once an event happens in editor, editor will call this * method of each plugin to handle the event as long as the event is not handled * exclusively by another plugin. * @param event The event to handle: */ onPluginEvent(event: PluginEvent): void; /** * Check if the plugin should handle the given event exclusively. * Handle an event exclusively means other plugin will not receive this event in * onPluginEvent method. * If two plugins will return true in willHandleEventExclusively() for the same event, * the final result depends on the order of the plugins are added into editor * @param event The event to check: */ willHandleEventExclusively(event: PluginEvent): boolean; private handleKeyDownEvent; private handleBeforeInputEvent; private shouldBrowserHandleBackspace; }