Module

typing/utils/findattributerange

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

module

Filtering

Functions

  • findAttributeRange( position, attributeName, value, model ) → Range

    Returns a model range that covers all consecutive nodes with the same attributeName and its value that intersect the given position.

    It can be used e.g. to get the entire range on which the linkHref attribute needs to be changed when having a selection inside a link.

    Parameters

    position : Position

    The start position.

    attributeName : String

    The attribute name.

    value : String

    The attribute value.

    model : Model

    The model instance.

    Returns

    Range

    The link range.