HtmlWithCustomOnClick

fun HtmlWithCustomOnClick(html: String, modifier: Modifier = Modifier, imageLoader: Map<String, EmbeddableImage> = emptyMap(), color: Color = Color.Unspecified, style: TextStyle = LocalTextStyle.current, urlSpanStyle: SpanStyle = SpanStyle(textDecoration = TextDecoration.Underline), imageAlign: PlaceholderVerticalAlign = PlaceholderVerticalAlign.AboveBaseline, onClick: (List<AnnotatedString.Range<String>>) -> Unit)

This will display html annotated text in a string. Images cannot be embedded in link tags. The following tags are supported: , , , , ,

  • Local/remote sources value in the img tab, must map to something in the imageLoader.

    When an img tag does not map to a EmbeddableImage, then this will use StripeImageLoader to retrieve the images and only renders once the images are downloaded.

    When the text is clicked, a callback returns ALL URLs from as annotatedStrings.

    Parameters

    urlSpanStyle

    The style given to URLs, defaults to TextDecoration.Underline

    imageAlign

    The vertical alignment for the image in relation to the text, defaults to PlaceholderVerticalAlign.AboveBaseline

    onClick

    Callback returning all annotatedStrings with URL when the text is clicked.