import type { PickerHandler } from './PickerHandler'; import type { EditorPlugin, IEditor, PluginEvent } from 'roosterjs-content-model-types'; /** * PickerPlugin represents a plugin of editor which can handle picker related behaviors, including * - Show picker when special trigger key is pressed * - Hide picker * - Change selection in picker by Up/Down/Left/Right * - Apply selected item in picker * * PickerPlugin doesn't provide any UI, it just wraps related DOM events and invoke callback functions. */ export declare class PickerPlugin implements EditorPlugin { private triggerCharacter; private readonly handler; private isMac; private lastQueryString; private helper; /** * Construct a new instance of PickerPlugin class * @param triggerCharacter The character to trigger a picker to be shown * @param handler Picker handler for receiving picker state change events */ constructor(triggerCharacter: string, handler: PickerHandler); /** * Get a friendly name */ getName(): string; /** * Initialize this plugin. This should only be called from Editor * @param editor Editor instance */ initialize(editor: IEditor): void; /** * Dispose this plugin */ dispose(): 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; /** * Handle events triggered from editor * @param event PluginEvent object */ onPluginEvent(event: PluginEvent): void; private onSuggestingKeyDown; private onSuggestingInput; private onInput; }