replace-node

Type: Operation

Removes a node and its descendants from the document, inserting a new structure in its place.

Imported operation data

  1. contextNodeId

    (Required)

    Type: NodeId

    The node to replace

  2. replacementNodeStructure

    (Required)

    A stencil describing the structure to be inserted in place of the removed node. This stencil may mention the selection.

  3. [model]

    (Required)

    Type: Object

    Model to be bound to the stencil after insertion.

  4. [overrideRange]

    (Required)

    The range to set the selection in as defined by the stencil instead of the selectionRange