Module

engine/model/operation/utils

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

module

Filtering

Type Definitions

  • NodeSet

Functions

  • internal

    _insert( position, nodes ) → Range

    Inserts given nodes at given position.

    Parameters

    position : Position

    Position at which nodes should be inserted.

    nodes : NodeSet

    Returns

    Range

    Range spanning over inserted elements.

  • internal

    _move( this, sourceRange, targetPosition ) → Range

    Moves nodes in given range to given target position. Only flat ranges are accepted.

    Parameters

    this : any
    sourceRange : Range

    Range containing nodes to move.

    targetPosition : Position

    Position to which nodes should be moved.

    Returns

    Range

    Range containing moved nodes.

  • internal

    _normalizeNodes( nodes ) → Array<Node>

    Normalizes given object or an array of objects to an array of nodes. See NodeSet for details on how normalization is performed.

    Parameters

    nodes : NodeSet

    Objects to normalize.

    Returns

    Array<Node>

    Normalized nodes.

  • internal

    _remove( this, range ) → Array<Node>

    Removed nodes in given range. Only flat ranges are accepted.

    Parameters

    this : any
    range : Range

    Range containing nodes to remove.

    Returns

    Array<Node>
  • internal

    _setAttribute( range, key, value ) → void

    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 : unknown

    Attribute value.

    Returns

    void