App Html Text
fun AppHtmlText(html: String, modifier: Modifier = Modifier, style: TextStyle = MaterialTheme.typography.bodyMedium, color: Color = Color.Unspecified, linkColor: Color = MaterialTheme.colorScheme.primary, headingColor: Color = MaterialTheme.colorScheme.onSurface, onLinkClick: (String) -> Unit? = null)
AppHtmlText is a component designed to render strings containing basic HTML tags using the project's typography and color scheme.
Supported tags:
, : Bold text
, : Italic text
: Underlined text
,: Strikethrough text
: Line break: Paragraph (adds spacing)
,
,
: Headings
Parameters
html
The HTML string to be rendered.
modifier
The Modifier to be applied to the text.
style
The TextStyle to be applied as the base style.
color
The base color for the text. If Color.Unspecified, uses the default from style.
link Color
The color to be used for tags. Defaults to the theme's primary color.
heading Color
The color to be used for headings. Defaults to onSurface.
on Link Click
Optional callback for when a link ( tag) is clicked. If provided, overrides default URI handling.