Module

comments/annotations/annotationcollection

@ckeditor/ckeditor5-comments/src/annotations/annotationcollection

module

Filtering

Classes

Type Definitions

Functions

  • bindAnnotationCollections( __namedParameters = { __namedParameters.filter, __namedParameters.source, __namedParameters.target } ) → void

    A helper function that binds two AnnotationCollections and allows filtering items based on the passed callback.

    Since refreshPositioning sorts the annotations by removing and inserting items, the binding implemented by the bindTo() method is lost. This is why this helper needs to be used.

    This helper is used by the annotations UIs to filter which annotations from the main annotation collection should be handled by a given annotations UI.

    Parameters

    __namedParameters : object
    Properties
    __namedParameters.filter : ( Annotation ) => boolean
    __namedParameters.source : AnnotationCollection
    __namedParameters.target : AnnotationCollection

    Returns

    void