insertNodeHorizontal

Type: Function

Inserts a node horizontally, prefering positions after the given one.

Given a position at the start of parentNode O;

  • with a certain childList;

  • and a childNode X;

  • and a schema: (A (X){0.1} B) (meaning: A, then optionally X, then B);

  • And the Node O:

    Other

       O
      / \
     A   B

The following attempt will be made:

Other

     O
   / | \
  X  A  B

This will fail, the next attempt will be:

Other

     O
   / | \
  A  X  B

This is valid, true will be returned.

Refer to primitives for more information on how to include this primitive.

Arguments

  1. position

    (Required)

    The position to start the search for a position to insert the node

  2. node

    (Required)

    Type: Node

    The node to insert.

  3. blueprint

    (Required)

    Type: Blueprint

    The blueprint in which the mutation will be executed

  4. format

    (Required)

    Type: Format

    The format to use to validate the outcome of each attempt at insertion

  5. allowedRange

    (Optional)

    The range at which the insert may happen. If the range would be exceeded, no insert would happen. Default to anywhere under the node The range should reside directly under the position.container

Returns

Type: Boolean

The result of the operation.