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.

Properties

Link copied to clipboard

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: 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: RichTextScope.() -> Unit)
fun <T> RichTextScope.FormattedList(listType: ListType, items: List<T>, startIndex: Int = 0, drawItem: RichTextScope.(T) -> Unit)

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

Link copied to clipboard
fun RichTextScope.Heading(level: Int, children: RichTextScope.() -> Unit)
fun RichTextScope.Heading(level: Int, text: String)

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: () -> Unit)

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

fun RichTextScope.InfoPanel(infoPanelType: InfoPanelType, text: String)

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: ERROR CLASS: Symbol not found for 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: ERROR CLASS: Symbol not found for Modifier = Modifier, onTextLayout: (ERROR CLASS: Symbol not found for TextLayoutResult) -> Unit = {}, softWrap: Boolean = true, overflow: ERROR CLASS: Symbol not found for 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

Sets the RichTextStyle for its children.