/** * Shared DOM utility helpers used across editor features. */ /** * Returns true if `el` is a block-level element with no meaningful content * (empty or only contains a single
). */ export declare function isEmptyBlock(node: Node): boolean; /** * Inserts `newEl` into `editorArea` relative to the cursor's block ancestor, * avoiding double-paragraph artifacts. * * Strategy: * - If the cursor's direct-child-of-editorArea block is empty: insert `newEl` * BEFORE it so the existing empty paragraph serves as the exit spacer after. * - If the block has content: insert `newEl` AFTER it, then append `spacer` only * when the next sibling isn't already a paragraph. * * Returns the spacer paragraph that was used (either the original empty block * reused as spacer, or a newly created one), so callers can place the cursor. */ export declare function insertBlockAtCursor(editorArea: HTMLElement, range: Range, newEl: HTMLElement, createSpacer?: boolean): HTMLElement; //# sourceMappingURL=dom-utils.d.ts.map