comments/annotations/annotationcollection
@ckeditor/ckeditor5-comments/src/annotations/annotationcollection
Filtering
Classes
-
A collection of annotations.
Functions
-
bindAnnotationCollections( options = { `options.source`, `options.target`, options.filter } )
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 thebindTo()
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
options : Object
-
Properties
`options.source` : AnnotationCollection
The source collection from which the annotations will be taken.
`options.target` : AnnotationCollection
The target collection that will be synced to the source collection.
options.filter : function
Filtering function that gets an annotation and should return
true
if the annotation should be copied to thetarget
collection.
Every day, we work hard to keep our documentation complete. Have you spotted an outdated information? Is something missing? Please report it via our issue tracker.