Sign up (with export icon)

DowncastAttributeCreatorFunction

Api-typedef icontypedef

Parameters

attributeValue: unknown

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: ModelItem

Changed item or converted selection.

data.range: ModelRange

Range spanning over changed item or selection range.

Returns

DowncastAttributeDescriptor | null

A { key, value } object. If key is 'class', value can be a String or an array of Strings. If key is 'style', value is an object with key-value pairs. In other cases, value is a String.