Ordered and Unordered Lists¶
You can add ordered and unordered lists using RichTextState
:
// Toggle ordered list.
richTextState.toggleOrderedList()
// Toggle unordered list.
richTextState.toggleUnorderedList()
You can get if the current selection is an ordered or unordered list, using RichTextState
:
// Get if the current selection is an ordered list.
val isOrderedList = richTextState.isOrderedList
// Get if the current selection is an unordered list.
val isUnorderedList = richTextState.isUnorderedList
You can control the list indentation using RichTextState
: