AttributeEditScope

A builder DSL for safely mutating multiple text attributes within a specific range.

Functions

Link copied to clipboard

Convenience function to set the background color within this builder.

Link copied to clipboard

Convenience function to set the blockquote attribute of the paragraph within this builder. The applied range will automatically snap to paragraph boundaries.

Link copied to clipboard

Convenience function to apply the bold text attribute within this builder.

Link copied to clipboard

Convenience function to set the bullet list attribute of the paragraph within this builder. The applied range will automatically snap to paragraph boundaries.

Link copied to clipboard
fun clearAll()

Removes all rich text attributes (both span and paragraph level) in the range. Including user-customized attributes.

Link copied to clipboard

Convenience function to remove the background color attribute in the range.

Link copied to clipboard

Convenience function to remove the blockquote attribute in the range.

Link copied to clipboard

Convenience function to remove the bold attribute in the range.

Link copied to clipboard

Convenience function to remove the bullet list attribute in the range.

Link copied to clipboard

Convenience function to remove the font size attribute in the range.

Link copied to clipboard

Convenience function to remove the heading attribute in the range.

Link copied to clipboard

Convenience function to remove the inline code attribute in the range.

Link copied to clipboard

Convenience function to remove the italic attribute in the range.

Link copied to clipboard

Convenience function to remove the link attribute in the range.

Link copied to clipboard

Convenience function to remove the ordered list attribute in the range.

Link copied to clipboard

Convenience function to remove the strikethrough attribute in the range.

Link copied to clipboard

Convenience function to remove the text alignment attribute in the range.

Link copied to clipboard

Convenience function to remove the text color attribute in the range.

Link copied to clipboard

Convenience function to remove the underline attribute in the range.

Link copied to clipboard

Convenience function to set the font size within this builder.

Link copied to clipboard

Convenience function to set the heading level of the paragraph within this builder. The applied range will automatically snap to paragraph boundaries.

Link copied to clipboard

Convenience function to apply the inline code text attribute within this builder.

Link copied to clipboard

Convenience function to apply the italic text attribute within this builder.

Link copied to clipboard

Convenience function to set the link attribute within this builder.

Link copied to clipboard

Convenience function to set the ordered list attribute of the paragraph within this builder. The applied range will automatically snap to paragraph boundaries.

Link copied to clipboard

Sets or removes a paragraph-level attribute for the given key. The underlying range is automatically snapped to paragraph boundaries.

Link copied to clipboard
fun <T : Any> setSpanAttribute(key: SpanAttributeKey<T>, value: T?)

Sets or removes a character span attribute for the given key. If value is null, the span attribute is removed from the specified range.

Link copied to clipboard

Convenience function to apply the strikethrough text attribute within this builder.

Link copied to clipboard

Convenience function to set the text alignment of the paragraph within this builder. The applied range will automatically snap to paragraph boundaries.

Link copied to clipboard

Convenience function to set the text color within this builder.

Link copied to clipboard

Convenience function to apply the underline text attribute within this builder.