/** * Comment editor for the Comments plugin. * * @private * @class CommentEditor */ declare class CommentEditor { #private; /** * Registers a local hook listener scoped to this instance. Provided by the `localHooks` mixin. */ addLocalHook: (key: string, callback: Function) => void; /** * Executes all local hook listeners registered under the given name. Provided by the `localHooks` mixin. */ runLocalHooks: Function; /** * Returns the CSS class name applied to the outer comments container element. */ static get CLASS_EDITOR_CONTAINER(): string; /** * Returns the CSS class name applied to the comment editor element. */ static get CLASS_EDITOR(): string; /** * Returns the CSS class name applied to the comment textarea input element. */ static get CLASS_INPUT(): string; /** * Returns the CSS class name applied to cells that have comments attached. */ static get CLASS_CELL(): string; /** * Initializes the comment editor, builds its DOM structure, and attaches the resize observer. */ constructor(rootDocument: Document, isRtl: boolean, rootPortalElement: HTMLElement); /** * Set position of the comments editor according to the provided x and y coordinates. * * @param {number} x X position (in pixels). * @param {number} y Y position (in pixels). */ setPosition(x: number, y: number): void; /** * Set the editor size according to the provided arguments. * * @param {number} width Width in pixels. * @param {number} height Height in pixels. */ setSize(width: number, height: number): void; /** * Returns the size of the comments editor. * * @returns {{ width: number, height: number }} */ getSize(): { width: number; height: number; }; /** * Starts observing the editor size. */ observeSize(): void; /** * Reset the editor size to its initial state. */ resetSize(): void; /** * Set the read-only state for the comments editor. * * @param {boolean} state The new read only state. */ setReadOnlyState(state: boolean): void; /** * Show the comments editor. */ show(): void; /** * Hide the comments editor. */ hide(): void; /** * Checks if the editor is visible. * * @returns {boolean} */ isVisible(): boolean; /** * Set the comment value. * * @param {string} [value] The value to use. */ setValue(value?: string): void; /** * Get the comment value. * * @returns {string} */ getValue(): string; /** * Checks if the comment input element is focused. * * @returns {boolean} */ isFocused(): boolean; /** * Focus the comments input element. */ focus(): void; /** * Create the `textarea` to be used as a comments editor. * * @returns {HTMLElement} */ createEditor(): HTMLDivElement; /** * Get the input element. * * @returns {HTMLTextAreaElement | null} */ getInputElement(): HTMLTextAreaElement | null; /** * Get the editor element. * * @returns {HTMLElement} The editor element. */ getEditorElement(): HTMLElement | null; /** * Destroy the comments editor. */ destroy(): void; } export default CommentEditor;