insert Nodes
Type: Function
Insert a set of nodes at the given position. If the position is schema-invalid, the structure is splitted.
If the splitPoint is at the beginning, it will attempt to place the new node before the parentElement and split from there
If the insert at this position is invalid, split the parent and try to place it at the split point.
After an exit, if the exited node is an empty default textcontainer, it will be removed.
Refer to primitives for more information on how to include this primitive.
Arguments
position
(Required)
Type: BlueprintPosition
The position at which to insert
nodes
(Required)
Type: Array<Node>
The nodes to insert
blueprint
(Required)
Type: Blueprint
The blueprint to use for the split
top
Parent (Required)
Type: Node | NULL
The highest parent under which the node should be inserted, or null to continue until the document level
format
(Required)
Type: Format
The format to use for retrieving the metadata, validator and synthesizer
position
After Insert (Optional)
Type: BlueprintPosition
The position after the just inserted nodes, will be placed at the other half of a split, if it happens
Returns
Type: Boolean
Whether the split succeeds