$getNodeByKey
functionReturns the node with the given key from the active EditorState (or the given EditorState), or null if it does not exist.
Import
import { $getNodeByKey } from '@modular/sdk/editor';Notes
- deprecated
- The type parameter is an unchecked and unsafe cast, equivalent to `$getNodeByKey(key) as T | null`, and will be removed in a future release. Call this function without a type argument and narrow the result with a type guard instead.