import type { TableWithRoot } from './TableWithRoot'; import type { TableEditFeatureName } from './editors/features/TableEditFeatureName'; import type { OnTableEditorCreatedCallback } from './OnTableEditorCreatedCallback'; import type { DOMHelper, EditorPlugin, IEditor, PluginEvent } from 'roosterjs-content-model-types'; /** * TableEdit plugin, provides the ability to resize a table by drag-and-drop */ export declare class TableEditPlugin implements EditorPlugin { private anchorContainerSelector?; private onTableEditorCreated?; private disableFeatures?; private tableSelector; private editor; private onMouseMoveDisposer; private tableRectMap; private tableEditor; /** * Construct a new instance of TableResize plugin * @param anchorContainerSelector An optional selector string to specify the container to host the plugin. * The container must not be affected by transform: scale(), otherwise the position calculation will be wrong. * If not specified, the plugin will be inserted in document.body * @param onTableEditorCreated An optional callback to customize the Table Editors elements when created. * @param disableFeatures An optional array of TableEditFeatures to disable * @param tableSelector A function to select the tables to be edited. By default, it selects all contentEditable tables. */ constructor(anchorContainerSelector?: string | undefined, onTableEditorCreated?: OnTableEditorCreatedCallback | undefined, disableFeatures?: TableEditFeatureName[] | undefined, tableSelector?: (domHelper: DOMHelper) => TableWithRoot[]); /** * 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; private onMouseOut; /** * Dispose this plugin */ dispose(): void; /** * Handle events triggered from editor * @param event PluginEvent object */ onPluginEvent(e: PluginEvent): void; private onMouseMove; /** * @internal Public only for unit test * @param entry Table to use when setting the Editors * @param event (Optional) Mouse event */ setTableEditor(entry: TableWithRoot | null, event?: MouseEvent): void; private invalidateTableRects; private disposeTableEditor; private ensureTableRects; }