import { InlineTool, SanitizerConfig } from '@editorjs/editorjs'; import { AttributeObject } from '../editorjs-tool.component'; import { InlineStyleTool } from './tool-type/inline-style-tool.component'; /** * Link formatting tool for EditorJS * Allows applying links to selected text or entire blocks with various options * including target blank and obfuscation features */ export declare class LinkTool extends InlineStyleTool implements InlineTool { static title: string; private readonly commandName; tag: 'SPAN' | 'A'; hasSeparatorBefore: boolean; linkDeletion: boolean; modifies: { tag: boolean; style: boolean; class: boolean; attribute: boolean; }; attributeName: string; attributesToApply: AttributeObject[]; private readonly CSS; linkCss: { container: string; linkContainer: string; targetContainer: string; obfuscationContainer: string; linkInputId: string; targetCheckboxId: string; obfuscationCheckboxId: string; addButtonClass: string; editButtonClass: string; deleteButtonClass: string; }; private nodes; private selectedBlocksService; api: any; private _state; isLinkDropdownOpen: boolean; 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(): HTMLButtonElement; /** * Applies link formatting to selected text or selected blocks */ surround(range: Range | null, applyLink?: boolean): Promise; /** * Applies link formatting to all selected blocks */ private applyLinkToSelectedBlocks; /** * Applies link formatting to a specific block */ private applyLinkToBlock; /** * Applies link formatting to a text element */ private applyLinkToTextElement; /** * Removes existing link elements */ private removeExistingLinkElements; /** * Creates and applies a new link element */ private createAndApplyLinkElement; /** * Applies link to all content (when no block elements are present) */ private applyLinkToAllContent; /** * Applies link to block elements by wrapping only the text content */ private applyLinkToBlockElements; /** * Applies link to the content of a block element */ private applyLinkToBlockContent; /** * Applies link to a single element */ private applyLinkToElement; /** * Gets link configuration from the dropdown inputs */ private getLinkConfiguration; /** * Applies link to the current selection */ applyLink(): Promise; /** * Deletes link from the current selection or selected blocks */ deleteLink(): Promise; /** * Deletes links from all selected blocks */ private deleteLinkFromSelectedBlocks; /** * Deletes links from a specific block */ private deleteLinkFromBlock; /** * Deletes links from a text element */ private deleteLinkFromTextElement; /** * Deletes links from all content (when no block elements are present) */ private deleteLinkFromAllContent; /** * Deletes links from block elements */ private deleteLinkFromBlockElements; /** * Deletes links from the content of a block element */ private deleteLinkFromBlockContent; /** * Deletes links from a single element */ private deleteLinkFromElement; /** * Edits existing link */ editLink(): Promise; /** * Renders the link dropdown actions */ renderActions(): HTMLDivElement; /** * Shows link actions dropdown with current link state */ showActions(mark: any): void; /** * Hides link actions dropdown */ hideActions(): void; /** * Opens or closes the link dropdown */ openLinkDropdown(event: any): Promise; /** * Gets a block by its ID */ private getBlockById; /** * Gets the editable text element of a block */ private getTextElement; /** * Checks the tool state based on selection */ checkState(selection: Selection | null): boolean; /** * Prevents label from stealing focus when clicked */ private preventLabelFromStealingFocus; }