Module

typing/utils/utils

@ckeditor/ckeditor5-typing/src/utils/utils

module

Filtering

Functions

  • compareChildNodes( oldChild, newChild ) → Boolean

    private

    Checks whether two view nodes are identical, which means they are the same object or contain exactly same data (in case of text nodes).

    Parameters

    oldChild : Node
    newChild : Node

    Returns

    Boolean
  • containerChildrenMutated( mutations ) → Boolean

    private

    Returns true if container children have mutated or more than a single text node was changed.

    Parameters

    mutations : Array.<(MutatedText | MutatedChildren)>

    Returns

    Boolean
  • getSingleTextNodeChange( mutation ) → Object | undefined

    private

    Returns change made to a single text node.

    Parameters

    mutation : MutatedText | MutatedChildren

    Returns

    Object | undefined

    Change object (see diffToChanges output) or undefined if more than a single text node was changed.

  • isShiftDeleteOnNonCollapsedSelection( domEventData, document ) → Boolean

    Checks if Shift + Delete keystroke was pressed on a non-collapsed selection.

    This key combination has a special meaning on Windows machines and it should work in the same way as the cut event on a non-collapsed selection.

    Parameters

    domEventData : DomEventData

    Event data.

    document : Document

    The document instance on which the event has been fired.

    Returns

    Boolean