export interface ButtonLabels { /** Label and tooltip of the copy button */ copy?: string; /** Label shown for a moment after the code is copied */ copied?: string; /** Label and tooltip of the download button */ download?: string; } /** Hover style of the buttons: inline styles cannot have one */ export declare const BUTTON_SHEET = ".jodit-code__copy:hover,.jodit-code__copy:focus-visible,.jodit-code__download:hover,.jodit-code__download:focus-visible{background:var(--jodit-code-copy-hover,rgba(127,127,127,.18))!important}"; /** Attribute that marks the buttons the editor adds, see {@link stripButtons} */ export declare const EDITOR_BUTTON = "data-jodit-code-button"; /** Saves `text` as a file named `name` */ export declare function downloadText(doc: Document, name: string, text: string): void; /** * Adds the copy button, and the download button for a block with `data-download`, to the header of `block`. * Returns false when the block has no header or already has the buttons. * * With `inEditor` the buttons get the {@link EDITOR_BUTTON} attribute and no click handlers: the editor handles * their clicks itself (see {@link copyBlock} and {@link downloadBlock}), because undo and redo restore the HTML of * a block without its handlers. */ export declare function addButtons(block: HTMLElement, { copy, copied, download }?: ButtonLabels, inEditor?: boolean): boolean; /** * Copies the code of a block and shows the "copied" state on its copy button for a moment. Resolves to whether * the code was copied. */ export declare function copyBlock(block: HTMLElement, { copy, copied }?: ButtonLabels): Promise; /** Saves the code of a block as a file, named after its `data-download` */ export declare function downloadBlock(block: HTMLElement): void; /** Removes the buttons of the blocks from an HTML value */ export declare function stripButtons(html: string): string;