applyFormat
Applies the given value for a SpanAttributeKey.
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.
Applies the given value for a ParagraphAttributeKey.
The format is applied to the paragraph(s) overlapping the current cursor position or selection.