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