Typedef

AttributeElementCreatorFunction (engine/conversion)

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

typedeffunction

A view element creator function that takes the model attribute value and downcast conversion API as parameters and returns a view attribute element.

Filtering

Parameters

attributeValue : any

The model attribute value to be converted to the view attribute element.

conversionApi : DowncastConversionApi

The conversion interface.

data : object

Additional information about the change (same as for attribute event).

Properties
data.attributeKey : string

Attribute key.

data.attributeNewValue : unknown

New attribute value.

data.attributeOldValue : unknown

Attribute value before the change. This is null when selection attribute is converted.

data.item : Item | Selection | DocumentSelection

Changed item or converted selection.

data.range : Range

Range spanning over changed item or selection range.

Returns

AttributeElement | null

The view attribute element.