wrapInSingleElement

Type: Function

Attempts to wrap the content of the given range in the given element.

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

Arguments

  1. rangeToWrap

    (Required)

    The range to wrap

  2. wrapperElement

    (Required)

    Type: Element

    The element in which to wrap, should be empty

  3. wrapUnderNode

    (Required)

    Type: Node | NULL

    If not null, the wrapping will not be applied above this node

  4. blueprint

    (Required)

    Type: Blueprint

    The blueprint in which to perform the operation

  5. format

    (Required)

    Type: Format

    The format used to validate the resul

  6. referenceNode

    (Required)

    Type: Node | NULL

    The node before which to place the nodes, or null to place the nodes at the end of wrapperElement

Returns

Type: Boolean

Whether the operation was successful