toggleFormat
Toggles a SpanAttributeKey that does not require a value (i.e. its value is Unit).
If text is selected, the format is applied to the selection. If no text is selected (cursor is collapsed), the format is applied to the next typed characters. In either case, if the attribute is currently active, it is removed. Otherwise, it is applied.
Toggles a ParagraphAttributeKey that does not require a value (i.e. its value is Unit).
The format is applied to the paragraph(s) overlapping the current cursor position or selection. If the attribute is currently active, it is removed. Otherwise, it is applied.