$insertNodeToNearestRootAtCaret
functionIf the insertion caret is the root/shadow root node (see $isRootOrShadowRoot), the node will be inserted there, otherwise the parent nodes will be split according to the given options.
Import
import { $insertNodeToNearestRootAtCaret } from '@modular/sdk/editor';Notes
- returns
- The node after its insertion