/** Code, language and settings of an existing block */ export interface BlockData { code: string; language: string; lineNumbers: boolean; /** Name of the file the code is offered as, `''` for the default name; `null` when it is not offered */ download: string | null; /** Saved with plain code for the highlighter of the site, see `renderNative` */ native: boolean; /** Has the header with the language and the copy and download buttons */ header: boolean; } /** * The block that contains `node`: a block of this plugin, or, unless `plainPre` is false, a plain `
` (with or
* without ``), which becomes such a block when it is edited. `null` outside a block or outside `root`.
*/
export declare function findBlock(node: Node | null, root: HTMLElement, plainPre?: boolean): HTMLElement | null;
/** Reads the code and the settings of a block, see {@link findBlock} */
export declare function readBlock(block: HTMLElement): BlockData;
/**
* Turns the `` elements of the blocks into `` elements for the editor: tools that take every `` of
* the editor for their own (Jodit PRO `pasteCode`) leave the blocks alone. {@link unlockValue} turns them back.
*/
export declare function lockValue(html: string): string;
/**
* Removes what the editor adds to the blocks (buttons, non-editable state, selection, `` in place of ``)
* from an HTML value. The `` of a block gets the `nohighlight` and `nohljsln` classes in place of `language-*`, so that the
* highlighters of a site (highlight.js, Prism) leave the block alone; its language stays in `data-lang`.
*/
export declare function unlockValue(html: string): string;
/** The classes of the `` of a block with `nohighlight` and `nohljsln` in place of `language-*` */
export declare function noHighlight(classes: string): string;