import { InlineTool, SanitizerConfig } from '@editorjs/editorjs'; import { InlineStyleTool } from './tool-type/inline-style-tool.component'; /** * Clean formatting tool for EditorJS * Allows removing all formatting from selected text or entire blocks */ export declare class CleanTool extends InlineStyleTool implements InlineTool { static title: string; private readonly commandName; hasSeparatorBefore: boolean; private readonly CSS; modifies: { tag: boolean; style: boolean; class: boolean; attribute: boolean; }; private nodes; private selectedBlocksService; api: any; private _state; static get isInline(): boolean; static get sanitize(): SanitizerConfig; get state(): boolean; set state(state: boolean); get shortcut(): string; constructor({ api }: { api: any; }); /** * Creates and configures the tool button */ render(): HTMLElement; /** * Cleans formatting from selected text or selected blocks */ surround(range: Range): Promise; /** * Cleans formatting from all selected blocks */ private cleanSelectedBlocks; /** * Cleans formatting from a specific block */ private cleanBlock; /** * Cleans formatting from a text element */ private cleanTextElement; /** * Cleans formatting from selected text */ private cleanSelectedText; /** * Cleans only the selected text (original behavior) */ private cleanSelectedTextOnly; /** * Cleans all formatting from the entire div when selection covers all text */ private cleanEntireDiv; /** * Finds the first div element above the given element */ private findFirstDivAbove; /** * Cleans all formatting from an entire container element */ private cleanEntireContainer; /** * Cleans all formatting from an entire container element (alternative approach) * Removes formatting elements and specific we-* classes */ private cleanEntireContainerAdvanced; /** * Cleans up formatting elements that might be left after cleaning */ private cleanupFormattingElements; /** * Gets a block by its ID */ private getBlockById; /** * Gets the editable text element of a block */ private getTextElement; /** * Checks if the current selection covers all visible text in its container div */ private isSelectionCoveringAllText; /** * Gets all visible text content from an element, excluding hidden elements */ private getAllVisibleText; /** * Checks the tool state based on selection */ checkState(selection: Selection | null): boolean; }