$getNearestNodeOfType
functionTakes a node and traverses up its ancestors (toward the root node) in order to find a specific type of node.
Import
import { $getNearestNodeOfType } from '@modular/sdk/editor';Notes
- returns
- the node of type klass that was passed, or null if none exist.