import type { EditorPlugin, IEditor, PluginEvent } from 'roosterjs-editor-types'; /** * Paste plugin, handles BeforePaste event and reformat some special content, including: * 1. Content copied from Word * 2. Content copied from Excel * 3. Content copied from Word Online or OneNote Online */ export default class Paste implements EditorPlugin { private unknownTagReplacement; private convertSingleImageBody; private editor; /** * Construct a new instance of Paste class * @param unknownTagReplacement Replace solution of unknown tags, default behavior is to replace with SPAN * @param convertSingleImageBody When enabled, if clipboard HTML contains a single image, we reuse the image without modifying the src attribute. * When disabled, pasted image src attribute will use the dataUri from clipboard data -- By Default disabled. */ constructor(unknownTagReplacement?: string, convertSingleImageBody?: boolean); /** * Get a friendly name of this plugin */ 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; /** * Handle events triggered from editor * @param event PluginEvent object */ onPluginEvent(event: PluginEvent): void; }