Typedef

DowncastAddMarkerEvent (engine/conversion)

@ckeditor/ckeditor5-engine/src/conversion/downcastdispatcher

typedefDowncastEvent<'addMarker'>

Fired when a new marker is added to the model. Also fired when a collapsed model selection that is inside a marker is converted.

addMarker is a namespace for a class of events. Names of actually called events follow this pattern: addMarker:markerName. By specifying certain marker names, you can make the events even more gradual. For example, if markers are named foo:abc, foo:bar, then it is possible to listen to addMarker:foo or addMarker:foo:abc and addMarker:foo:bar events.

If the marker range is not collapsed:

  • the event is fired for each item in the marker range one by one,
  • conversionApi.consumable includes each item of the marker range and the consumable value is same as the event name.

If the marker range is collapsed:

  • there is only one event,
  • conversionApi.consumable includes marker range with the event name.

If the selection inside a marker is converted:

  • there is only one event,
  • conversionApi.consumable includes the selection instance with the event name.

Filtering

Fired by