utils (engine/model/operation)
@ckeditor/ckeditor5-engine/src/model/operation/utils
Contains functions used for composing model tree by operations. Those functions are built on top of node, and it's child classes', APIs.
Filtering
Functions
-
Removed nodes in given range. Only flat ranges are accepted.
-
_setAttribute( range, key, value )
module:engine/model/operation/utils~utils._setAttribute
protected static
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 : Range
Range containing nodes that should have the attribute set. Must be a flat range.
key : String
Key of attribute to set.
value : *
Attribute value.
-
Inserts given nodes at given position.
-
move( sourceRange, targetPosition ) → Range
module:engine/model/operation/utils~utils.move
protected static
Moves nodes in given range to given target position. Only flat ranges are accepted.
-
normalizeNodes( nodes ) → Array.<Node>
module:engine/model/operation/utils~utils.normalizeNodes
protected static
Every day, we work hard to keep our documentation complete. Have you spotted an outdated information? Is something missing? Please report it via our issue tracker.