Skip to main content
Modular Documentation
Guides
Reference
Reference
/
@modular/sdk/editor
$isLeafNode
function
Returns true if the given node is a leaf (TextNode, LineBreakNode, or DecoratorNode).
function $isLeafNode(node: LexicalNode | null | undefined): node is TextNode | LineBreakNode | DecoratorNode<unknown>
Import
import { $isLeafNode } from '@modular/sdk/editor';