Skip to content

Code Spans

To add code spans, RichTextState provides toggleCodeSpan method:

// Toggle code span.
richTextState.toggleCodeSpan()

To get if the current selection is a code span, use RichTextState.isCodeSpan:

// Get if the current selection is a code span.
val isCodeSpan = richTextState.isCodeSpan