removeFormat

fun RichTextState.removeFormat(key: <Error class: unknown class><out <Error class: unknown class>>)

Removes the format associated with the given key.

  • If key is a SpanAttributeKey and the selection is collapsed, the format is removed from the typing attributes for the next input.

  • Otherwise (text is selected, or key is a ParagraphAttributeKey), the format is removed from the overlapping selection or paragraph(s).