engine/model/operation/utils
@ckeditor/ckeditor5-engine/src/model/operation/utils
Filtering
Type Definitions
-
ModelNodeSet
module:engine/model/operation/utils~ModelNodeSet
Functions
-
Inserts given nodes at given position.
Parameters
position : ModelPosition
Position at which nodes should be inserted.
nodes : ModelNodeSet
Nodes to insert.
Returns
ModelRange
Range spanning over inserted elements.
-
internal
_move( this, sourceRange, targetPosition ) → ModelRange
module:engine/model/operation/utils~_move
Moves nodes in given range to given target position. Only flat ranges are accepted.
Parameters
this : any
sourceRange : ModelRange
Range containing nodes to move.
targetPosition : ModelPosition
Position to which nodes should be moved.
Returns
ModelRange
Range containing moved nodes.
-
internal
_normalizeNodes( nodes ) → Array<ModelNode>
module:engine/model/operation/utils~_normalizeNodes
Normalizes given object or an array of objects to an array of nodes. See NodeSet for details on how normalization is performed.
Parameters
nodes : ModelNodeSet
Objects to normalize.
Returns
Array<ModelNode>
Normalized nodes.
-
Removed nodes in given range. Only flat ranges are accepted.
Parameters
this : any
range : ModelRange
Range containing nodes to remove.
Returns
Array<ModelNode>
-
Sets given attribute on nodes in given range. The attributes are only set on top-level nodes of the range, not on its children.
Parameters
range : ModelRange
Range containing nodes that should have the attribute set. Must be a flat range.
key : string
Key of attribute to set.
value : unknown
Attribute value.
Returns
void
Every day, we work hard to keep our documentation complete. Have you spotted outdated information? Is something missing? Please report it via our issue tracker.
With the release of version 42.0.0, we have rewritten much of our documentation to reflect the new import paths and features. We appreciate your feedback to help us ensure its accuracy and completeness.