collapseElements

Type: Function

Replaces the given elements with their child nodes and ensures the result is valid afterwards using synthesis.

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

Arguments

  1. elementsToCollapse

    (Required)

    Type: Array<Element>

    The element nodes to collapse

  2. blueprint

    (Required)

    Type: Blueprint

    The blueprint in which to consider the nodes and perform the mutations.

  3. format

    (Required)

    Type: Format

    The format used to validate the result

Returns

Type: Boolean

Whether the collapse was successful.