Number of nodes contained inside this node list.
Sum of module:engine/model/node~ModelNode#offsetSize offset sizes of all nodes contained inside this node list.
InternalRemoves one or more nodes starting at the given index.
Index of the first node to remove.
OptionalhowMany: numberNumber of nodes to remove.
Array containing removed nodes.
InternalRemoves children nodes provided as an array. These nodes do not need to be direct siblings.
This method is faster than removing nodes one by one, as it recalculates offsets only once.
Array of nodes.
Iterable interface.
Iterates over all nodes contained inside this node list.
Gets the node at the given index. Returns null if incorrect index was passed.
Gets the node at the given offset. Returns null if incorrect offset was passed.
Returns an index of the given node or null if given node does not have a parent.
This is an alias to module:engine/model/node~ModelNode#index.
Returns the offset at which given node is placed in its parent or null if given node does not have a parent.
This is an alias to module:engine/model/node~ModelNode#startOffset.
Converts index to offset in node list.
Throws module:utils/ckeditorerror~CKEditorError CKEditorError model-nodelist-index-out-of-bounds if given index is less
than 0 or more than #length.
Converts offset in node list to index.
Throws module:utils/ckeditorerror~CKEditorError CKEditorError model-nodelist-offset-out-of-bounds if given offset is less
than 0 or more than #maxOffset.
Converts NodeList instance to an array containing nodes that were inserted in the node list. Nodes
are also converted to their plain object representation.
NodeList instance converted to Array.
Provides an interface to operate on a list of module:engine/model/node~ModelNode nodes.
NodeListis used internally in classes like module:engine/model/element~ModelElement Element or module:engine/model/documentfragment~ModelDocumentFragment ModelDocumentFragment.