Annotation (comments/annotations)
@ckeditor/ckeditor5-comments/src/annotations/annotation
Represents an annotation.
Annotation is an entity that combines an AnnotationView
and an annotation target (a DOM element or a Rect
) to which the annotation is bound.
Filtering
Properties
-
A collection of DOM elements which, when focused, make the annotation active.
By default this collection only contains the annotation view element. It can be extended with custom targets that will be tracked by the annotation focus tracking system.
-
The annotation inner view.
It is the view that is wrapped by the annotation view.
-
isActive : Boolean
The state of the annotation.
-
The annotation target to which the annotation view should be pinned.
It is either a DOM element or a rect instance.
-
The position and dimensions of the annotation target to which the annotation is bound.
-
type : String
The type of the annotation.
-
The annotation view.
Methods
-
constructor( options = { options.view, options.target, options.type } )
Creates an instance of the
Annotation
.Parameters
options : Object
-
Properties
options.view : AnnotationView
The annotation view.
options.target : Rect | function | Element
The annotation target.
options.type : String | function
The annotation type.
-
destroy()
Clears all event listeners and internal collections.
-
Updates the target rect in the annotation view instance.