HtmlHelpers
Type Stability: stable
Definition
TypeScript
import type { HtmlHelpers } from '@aionbuilders/nabu/extend';TypeScript
interface HtmlHelpers {
parseBlock: (el: Element) => PasteBlock | null;
parseBlocks: (el: Element) => PasteBlock[];
parseChildren: (el: Element) => PasteBlock[];
parseInline: (el: Element) => Delta<string>[];
}Properties
| Property | Type | Description |
|---|---|---|
parseBlock | (el: Element) => PasteBlock | null | The first block an element makes |
parseBlocks | (el: Element) => PasteBlock[] | Every block an element makes |
parseChildren | (el: Element) => PasteBlock[] | The blocks made by each child of an element |
parseInline | (el: Element) => Delta<string>[] | The inline content of an element, as a Loro delta |
Source: src/lib/utils/extensions.js:65