AttributeStyleBuilder

Builder for creating custom AttributeStyleResolver instances.

Functions

Link copied to clipboard
fun blockTypeParagraphStyle(mapper: (<Error class: unknown class><out <Error class: unknown class>>) -> ParagraphStyle)

Registers a ParagraphStyle mapping applied to any BlockTypeAttributeKey present in the container. When the AttributeContainer contains any BlockTypeAttributeKey, the mapper is invoked with that key.

Link copied to clipboard
fun <T> paragraphStyle(key: <Error class: unknown class><T>, mapper: (T) -> ParagraphStyle)

Registers a ParagraphStyle mapping for a specific AttributeKey. When the AttributeContainer contains this key, the mapper is invoked with the key's value.

Link copied to clipboard
fun <T> spanStyle(key: <Error class: unknown class><T>, mapper: (T) -> SpanStyle)

Registers a SpanStyle mapping for a specific AttributeKey. When the AttributeContainer contains this key, the mapper is invoked with the key's value.