Package-level declarations

Types

Link copied to clipboard

A composable function that draws the gutter beside a BlockQuote.

Link copied to clipboard
data class CodeBlockStyle(val textStyle: ERROR CLASS: Symbol not found for TextStyle?? = null, val modifier: ERROR CLASS: Symbol not found for Modifier?? = null, val padding: ERROR CLASS: Symbol not found for TextUnit?? = null, val wordWrap: Boolean? = null)

Defines how CodeBlocks are rendered.

Link copied to clipboard
typealias HeadingStyle = (level: Int, @R|kotlin/ParameterName|(name = String(textStyle)) ERROR CLASS: Symbol not found for TextStyle) -> ERROR CLASS: Symbol not found for TextStyle

Function that computes the TextStyle for the given header level, given the current TextStyle for this point in the composition. Note that the TextStyle passed into this function will be fully resolved. The returned style will then be merged with the passed-in text style, so any unspecified properties will be inherited.

Link copied to clipboard
data class InfoPanelStyle(val contentPadding: ERROR CLASS: Symbol not found for PaddingValues?? = null, val background: (InfoPanelType) -> ERROR CLASS: Symbol not found for Modifier? = null, val textStyle: (InfoPanelType) -> ERROR CLASS: Symbol not found for TextStyle? = null)
Link copied to clipboard
Link copied to clipboard
data class ListStyle(val markerIndent: ERROR CLASS: Symbol not found for TextUnit?? = null, val contentsIndent: ERROR CLASS: Symbol not found for TextUnit?? = null, val itemSpacing: ERROR CLASS: Symbol not found for TextUnit?? = null, val orderedMarkers: RichTextScope.() -> OrderedMarkers? = null, val unorderedMarkers: RichTextScope.() -> UnorderedMarkers? = null)

Defines how FormattedLists should look.

Link copied to clipboard
Link copied to clipboard
interface OrderedMarkers

Defines how to draw list markers for FormattedLists that are Ordered.

Link copied to clipboard

Scope object for composables that can draw rich text.

Link copied to clipboard
data class RichTextStyle(val paragraphSpacing: ERROR CLASS: Symbol not found for TextUnit?? = null, val headingStyle: HeadingStyle? = null, val listStyle: ListStyle? = null, val blockQuoteGutter: BlockQuoteGutter? = null, val codeBlockStyle: CodeBlockStyle? = null, val tableStyle: TableStyle? = null, val infoPanelStyle: InfoPanelStyle? = null, val stringStyle: RichTextStringStyle? = null)

Configures all formatting attributes for drawing rich text.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class TableStyle(val headerTextStyle: ERROR CLASS: Symbol not found for TextStyle?? = null, val cellPadding: ERROR CLASS: Symbol not found for TextUnit?? = null, val borderColor: ERROR CLASS: Symbol not found for Color?? = null, val borderStrokeWidth: Float? = null)

Defines the visual style for a Table.

Link copied to clipboard

Defines how to draw list markers for FormattedLists that are Unordered.

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun BasicRichText(modifier: ERROR CLASS: Symbol not found for Modifier = Modifier, style: RichTextStyle? = null, children: RichTextScope.() -> Unit)

Draws some rich text. Entry point to the compose-richtext library.

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

Contextually disables scrollbar for Desktop CodeBlocks under content tree.

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
Link copied to clipboard
fun painterUnorderedMarkers(vararg painters: ERROR CLASS: Symbol not found for Painter): UnorderedMarkers

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

Link copied to clipboard
Link copied to clipboard
fun RichTextThemeProvider(textStyleProvider: () -> ERROR CLASS: Symbol not found for TextStyle? = null, textStyleBackProvider: (ERROR CLASS: Symbol not found for TextStyle, () -> Unit) -> Unit? = null, contentColorProvider: () -> ERROR CLASS: Symbol not found for Color? = null, contentColorBackProvider: (ERROR CLASS: Symbol not found for Color, () -> Unit) -> Unit? = null, content: () -> Unit)

Entry point for integrating app's own typography and theme system with RichText.

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.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.