Skip to main content

isOnlyChildInBlockNode

function

True when `node` is the sole non-whitespace child of a block DOM element. Used by the LineBreak importer to drop stray `<br>` elements that the legacy `$generateNodesFromDOM` also skipped (matches the behavior of `LineBreakNode.importDOM`).

function isOnlyChildInBlockNode(node: Node): boolean

Import

import { isOnlyChildInBlockNode } from '@modular/sdk/editor';