AttributeCreatorFunction (engine/conversion)
@ckeditor/ckeditor5-engine/src/conversion/downcasthelpers
A function that takes the model attribute value and downcast conversion API as parameters.
Filtering
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.
Parameters
attributeValue : *
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).Propertiesdata.item : Item | DocumentSelection
Changed item or converted selection.
data.range : Range
Range spanning over changed item or selection range.
data.attributeKey : String
Attribute key.
data.attributeOldValue : *
Attribute value before the change. This is
null
when selection attribute is converted.data.attributeNewValue : *
New attribute value.
Returns
Object | null
A
{ key, value }
object. Ifkey
is'class'
,value
can be aString
or an array ofString
s. Ifkey
is'style'
,value
is an object with key-value pairs. In other cases,value
is aString
.