To create, change or remove makers use model writers' methods:
the writer is the only proper way to change the data model it is not possible to change markers directly using this
collection. All markers created by the writer will be automatically added to this collection.
By default there is one marker collection available as model property.
_markers : Map
Creates a markers collection.
Symbol.iterator() → Iterable
Destroys marker collection and all markers inside it.
Iterates over all markers that starts with given
const markerFooA = markersCollection.set( 'foo:a', rangeFooA ); const markerFooB = markersCollection.set( 'foo:b', rangeFooB ); const markerBarA = markersCollection.set( 'bar:a', rangeBarA ); const markerFooBarA = markersCollection.set( 'foobar:a', rangeFooBarA ); Array.from( markersCollection.getMarkersGroup( 'foo' ) ); // [ markerFooA, markerFooB ] Array.from( markersCollection.getMarkersGroup( 'a' ) ); // 
has( markerOrName ) → Boolean
_refresh( markerOrName )
_remove( markerOrName ) → Boolean
MarkerCollectionalready had a marker with given name (or marker was passed), the marker in collection is updated and
event-updateevent is fired but only if there was a change (marker range or
managedUsingOperationsflag has changed.
markerOrName : String | Marker
Name of marker to set or marker instance to update.
range : Range
[ managedUsingOperations ] : Boolean
Specifies whether the marker is managed using operations.
[ affectsData ] : Boolean
Specifies whether the marker affects the data produced by the data pipeline (is persisted in the editor's data).
Markerinstance which was added or updated.
_destroyMarker( marker )
update( eventInfo, marker, oldRange, newRange )
Fired whenever marker is added, updated or removed from
eventInfo : EventInfo
An object containing information about the fired event.
marker : Marker
oldRange : Range | null
Marker range before the update. When is not defined it means that marker is just added.
newRange : Range | null
Marker range after update. When is not defined it means that marker is just removed.