insertNodes

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

  1. position

    (Required)

    The position at which to insert

  2. nodes

    (Required)

    Type: Array<Node>

    The nodes to insert

  3. blueprint

    (Required)

    Type: Blueprint

    The blueprint to use for the split

  4. topParent

    (Required)

    Type: Node | NULL

    The highest parent under which the node should be inserted, or null to continue until the document level

  5. format

    (Required)

    Type: Format

    The format to use for retrieving the metadata, validator and synthesizer

  6. positionAfterInsert

    (Optional)

    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