import type { AutoFormatOptions } from './interface/AutoFormatOptions'; import type { EditorPlugin, IEditor, PluginEvent } from 'roosterjs-content-model-types'; /** * Auto Format plugin handles auto formatting, such as transforming * characters into a bullet list. * It can be customized with options to enable or disable auto list features. */ export declare class AutoFormatPlugin implements EditorPlugin { private options; private editor; /** * @param options An optional parameter that takes in an object of type AutoFormatOptions, which includes the following properties: * - autoBullet: A boolean that enables or disables automatic bullet list formatting. Defaults to false. * - autoNumbering: A boolean that enables or disables automatic numbering formatting. Defaults to false. * - removeListMargins: A boolean to remove list margins when it is automatically triggered. Defaults to false. * - autoHyphen: A boolean that enables or disables automatic hyphen transformation. Defaults to false. * - autoFraction: A boolean that enables or disables automatic fraction transformation. Defaults to false. * - autoOrdinals: A boolean that enables or disables automatic ordinal number transformation. Defaults to false. * - autoLink: A boolean that enables or disables automatic hyperlink url address creation when pasting or typing content. Defaults to false. * - autoUnlink: A boolean that enables or disables automatic hyperlink removal when pressing backspace. Defaults to false. * - autoTel: A boolean that enables or disables automatic hyperlink telephone numbers transformation. Defaults to false. * - autoMailto: A boolean that enables or disables automatic hyperlink email address transformation. Defaults to false. * - autoHorizontalLine: A boolean that enables or disables automatic horizontal line creation. Defaults to false. */ constructor(options?: AutoFormatOptions); /** * 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; private shouldHandleInputEventExclusively; willHandleEventExclusively(event: PluginEvent): boolean; /** * 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; private autoLink; private tabFeatures; private features; private enterFeatures; private handleKeyboardEvents; private handleEditorInputEvent; private handleKeyDownEvent; private handleContentChangedEvent; }