vertical-insert

How to get vertical-insert

Depend on fontoxml-base-flow to make this operation available.

Vertically insert a node.

Inserts the given structure as close to the selection as possible. The structure is inserted under the closest ancestor node that will allow it. The operation will split ancestor elements as necessary, if allowed by their configured family, but will always prefer to exit an element if no content needs to be skipped to do so.

#tip:

If the selection is not empty, vertical-insert will insert the structure at the start (or end) of the selection, leaving contents intact. Usually, users will expect the selected content to be replaced. Therefore we recommend to use vertical-replace in most cases, unless there is a specific reason not to remove the selected content.

Imported operation data

Name Type Description
childNodeStructure StencilJsonML

A stencil describing the structure to be inserted.

[insertAtEnd=false] Boolean

True to insert the structure at the end of the current selection. Defaults to inserting at the start.

[model] Object

(Optional) model to be bound to the stencil after insertion

[overrideRange] OverrideRange

The range to operate on instead of the selectionRange

[ultimateParentNodeId] NodeId

The highest ancestor of the insertion position under which the insertion can take place. By default, all ancestors of the insertion position are considered.