Markdown

fun Markdown(content: String, colors: MarkdownColors = markdownColor(), typography: MarkdownTypography = markdownTypography(), modifier: Modifier = Modifier.fillMaxSize(), padding: MarkdownPadding = markdownPadding(), dimens: MarkdownDimens = markdownDimens(), flavour: MarkdownFlavourDescriptor = GFMFlavourDescriptor(), parser: MarkdownParser = MarkdownParser(flavour), imageTransformer: ImageTransformer = NoOpImageTransformerImpl(), annotator: MarkdownAnnotator = markdownAnnotator(), extendedSpans: MarkdownExtendedSpans = markdownExtendedSpans(), inlineContent: MarkdownInlineContent = markdownInlineContent(), components: MarkdownComponents = markdownComponents(checkbox = { MarkdownCheckBox(it.content, it.node, it.typography.text) }), animations: MarkdownAnimations = markdownAnimations(), referenceLinkHandler: ReferenceLinkHandler = ReferenceLinkHandlerImpl(), loading: @Composable (modifier: Modifier) -> Unit = { Box(modifier) }, success: @Composable (state: State.Success, components: MarkdownComponents, modifier: Modifier) -> Unit = { state, components, modifier -> MarkdownSuccess(state = state, components = components, modifier = modifier) }, error: @Composable (modifier: Modifier) -> Unit = { Box(modifier) })

Renders the markdown content using Material 3 styles.

Parameters

content

The markdown content to be rendered.

colors

The MarkdownColors to use for styling.

typography

The MarkdownTypography to use for text styles.

modifier

The Modifier to apply to the component.

padding

The MarkdownPadding to use for padding.

dimens

The MarkdownDimens to use for dimensions.

flavour

The MarkdownFlavourDescriptor to use for parsing.

parser

The MarkdownParser to use for parsing.

imageTransformer

The ImageTransformer to use for transforming images.

annotator

The MarkdownAnnotator to use for annotating links.

extendedSpans

The MarkdownExtendedSpans to use for extended spans.

inlineContent

The MarkdownInlineContent to use for inline content.

components

The MarkdownComponents to use for custom components.

animations

The MarkdownAnimations to use for animations.

referenceLinkHandler

The reference link handler to be used for handling links.

loading

Composable function to display while loading.

success

A composable function to be displayed with the markdown content. It receives the modifier, state and components as parameters. By default this is a Column.

error

Composable function to display on error.


fun Markdown(markdownState: MarkdownState, colors: MarkdownColors = markdownColor(), typography: MarkdownTypography = markdownTypography(), modifier: Modifier = Modifier.fillMaxSize(), padding: MarkdownPadding = markdownPadding(), dimens: MarkdownDimens = markdownDimens(), imageTransformer: ImageTransformer = NoOpImageTransformerImpl(), annotator: MarkdownAnnotator = markdownAnnotator(), extendedSpans: MarkdownExtendedSpans = markdownExtendedSpans(), inlineContent: MarkdownInlineContent = markdownInlineContent(), components: MarkdownComponents = markdownComponents(checkbox = { MarkdownCheckBox(it.content, it.node, it.typography.text) }), animations: MarkdownAnimations = markdownAnimations(), loading: @Composable (modifier: Modifier) -> Unit = { Box(modifier) }, success: @Composable (state: State.Success, components: MarkdownComponents, modifier: Modifier) -> Unit = { state, components, modifier -> MarkdownSuccess(state = state, components = components, modifier = modifier) }, error: @Composable (modifier: Modifier) -> Unit = { Box(modifier) })

Renders the markdown content using Material 3 styles.

Parameters

markdownState

The MarkdownState to use for parsing.

colors

The MarkdownColors to use for styling.

typography

The MarkdownTypography to use for text styles.

modifier

The Modifier to apply to the component.

padding

The MarkdownPadding to use for padding.

dimens

The MarkdownDimens to use for dimensions.

imageTransformer

The ImageTransformer to use for transforming images.

annotator

The MarkdownAnnotator to use for annotating links.

extendedSpans

The MarkdownExtendedSpans to use for extended spans.

inlineContent

The MarkdownInlineContent to use for inline content.

components

The MarkdownComponents to use for custom components.

animations

The MarkdownAnimations to use for animations.

loading

Composable function to display while loading.

success

A composable function to be displayed with the markdown content. It receives the modifier, state and components as parameters. By default this is a Column.

error

Composable function to display on error.


fun Markdown(state: State, colors: MarkdownColors = markdownColor(), typography: MarkdownTypography = markdownTypography(), modifier: Modifier = Modifier.fillMaxSize(), padding: MarkdownPadding = markdownPadding(), dimens: MarkdownDimens = markdownDimens(), imageTransformer: ImageTransformer = NoOpImageTransformerImpl(), annotator: MarkdownAnnotator = markdownAnnotator(), extendedSpans: MarkdownExtendedSpans = markdownExtendedSpans(), inlineContent: MarkdownInlineContent = markdownInlineContent(), components: MarkdownComponents = markdownComponents(checkbox = { MarkdownCheckBox(it.content, it.node, it.typography.text) }), animations: MarkdownAnimations = markdownAnimations(), loading: @Composable (modifier: Modifier) -> Unit = { Box(modifier) }, success: @Composable (state: State.Success, components: MarkdownComponents, modifier: Modifier) -> Unit = { state, components, modifier -> MarkdownSuccess(state = state, components = components, modifier = modifier) }, error: @Composable (modifier: Modifier) -> Unit = { Box(modifier) })

Renders the markdown content using Material 3 styles.

Parameters

state

The State to use for parsing.

colors

The MarkdownColors to use for styling.

typography

The MarkdownTypography to use for text styles.

modifier

The Modifier to apply to the component.

padding

The MarkdownPadding to use for padding.

dimens

The MarkdownDimens to use for dimensions.

imageTransformer

The ImageTransformer to use for transforming images.

annotator

The MarkdownAnnotator to use for annotating links.

extendedSpans

The MarkdownExtendedSpans to use for extended spans.

inlineContent

The MarkdownInlineContent to use for inline content.

components

The MarkdownComponents to use for custom components.

animations

The MarkdownAnimations to use for animations.

loading

Composable function to display while loading.

success

A composable function to be displayed with the markdown content. It receives the modifier, state and components as parameters. By default this is a Column.

error

Composable function to display on error.