Typedef

NodeSet (engine/model/operation)

@ckeditor/ckeditor5-engine/src/model/operation/utils

typedefItem | string | NodeList | DocumentFragment | Iterable<Item | string | NodeList | DocumentFragment>

Value that can be normalized to an array of nodes.

Non-arrays are normalized as follows:

  • Node is left as is,
  • TextProxy and string are normalized to Text,
  • NodeList is normalized to an array containing all nodes that are in that node list,
  • DocumentFragment is normalized to an array containing all of it's
  • children.

Arrays are processed item by item like non-array values and flattened to one array. Normalization always results in a flat array of nodes. Consecutive text nodes (or items normalized to text nodes) will be merged if they have same attributes.

Filtering