insertNode

Inserts a node in the selection.

Parameters

view EditorView<any> | { dispatch: (tr: Transaction<any>) => void; state: EditorState<any>; }

The view object of the Editor.

node Node<any>

A node object of the Editor.

scrollIntoView? boolean | undefined

An optional parameter. Defines if the content element will be scrolled to the current selection.

 /