Skip to main content

$getNodeFromDOMNode

function

Returns the LexicalNode directly associated with the given DOM node, or null if the DOM node has no Lexical key.

function $getNodeFromDOMNode(dom: Node, editorState?: EditorState): LexicalNode | null

Import

import { $getNodeFromDOMNode } from '@modular/sdk/editor';