RichTextScope

Scope object for composables that can draw rich text.

RichTextScope facilitates a context for RichText elements. It does not behave like a State or a CompositionLocal. Starting from BasicRichText, this scope carries information that should not be passed down as a state.

Functions

Link copied to clipboard

Draws a block quote, with a BlockQuoteGutter drawn beside the children on the start side.

Link copied to clipboard
fun RichTextScope.CodeBlock(wordWrap: Boolean? = null, children: @Composable RichTextScope.() -> Unit)
fun RichTextScope.CodeBlock(text: String, wordWrap: Boolean? = null)

A specially-formatted block of text that typically uses a monospace font with a tinted background.

Link copied to clipboard
inline fun RichTextScope.FormattedList(listType: ListType, vararg children: @Composable RichTextScope.() -> Unit)
fun <T> RichTextScope.FormattedList(listType: ListType, items: List<T>, startIndex: Int = 0, drawItem: @Composable RichTextScope.(T) -> Unit)

Creates a formatted list such as a bullet list or numbered list.

Link copied to clipboard

A section heading.

Link copied to clipboard

A simple horizontal line drawn with the current content color.

Link copied to clipboard
fun RichTextScope.InfoPanel(infoPanelType: InfoPanelType, content: @Composable () -> Unit)

A panel to show content similar to Bootstrap alerts, categorized as InfoPanelType.

A panel to show content similar to Bootstrap alerts, categorized as InfoPanelType. This composable is a shortcut to show only text in an info panel.

Link copied to clipboard
fun RichTextScope.Table(modifier: Modifier = Modifier, headerRow: RichTextTableCellScope.() -> Unit? = null, bodyRows: RichTextTableRowScope.() -> Unit)

Draws a table with an optional header row, and an arbitrary number of body rows.

Link copied to clipboard
fun RichTextScope.Text(text: RichTextString, modifier: Modifier = Modifier, onTextLayout: (TextLayoutResult) -> Unit = {}, softWrap: Boolean = true, overflow: TextOverflow = TextOverflow.Clip, maxLines: Int = Int.MAX_VALUE)

Renders a RichTextString as created with richTextString.

Link copied to clipboard
fun RichTextScope.textOrderedMarkers(vararg markers: (index: Int) -> String): OrderedMarkers

Creates an OrderedMarkers that will cycle through the values in markers for each indentation level given the index.

Link copied to clipboard

Creates an UnorderedMarkers that will cycle through the values in markers for each indentation level.

Link copied to clipboard

Properties