import type { DefaultFormat, EditorPlugin, IEditor, PluginEvent } from 'roosterjs-editor-types'; /** * A watermark plugin to manage watermark string for roosterjs */ export default class Watermark implements EditorPlugin { private watermark; private customClass?; private editor; private disposer; private format; /** * Create an instance of Watermark plugin * @param watermark The watermark string */ constructor(watermark: string, format?: DefaultFormat, customClass?: string | undefined); /** * Updates the watermark text. * @param watermark - The new watermark text. */ updateWatermark(watermark: string): void; /** * 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; private showHideWatermark; private removeWatermark; }