toAnnotatedStringFromMarkdown

fun String.toAnnotatedStringFromMarkdown(styles: RichTextStyles = RichTextStyles.DEFAULT, allowedLinkSchemes: Set<String> = DEFAULT_LINK_SCHEMES): AnnotatedString(source)

Parses this string as GitHub Flavored Markdown and renders it into a styled AnnotatedString.

Parameters

styles

Styling (fonts, colors, weights) applied to the parsed markdown elements; an editor's own are on TextEditorState.richTextStyles.

allowedLinkSchemes

The schemes a link keeps its look for (see sanitizeLinkUrl); an editor's own are on TextEditorState.allowedLinkSchemes.