Hello Team I don't know if this is the right plac...
# compose
m
Hello Team I don't know if this is the right place to ask this. I have a string that is server driven, this string is an HTML text that has most of the html tags like, <b></b>,<u></u>,<font color=#000000></font>. How do I render this text using AnnotatedString ? I have tried this, but it only works for android, it doesn't work for iOS.
Copy code
@Composable
fun annotatedString(text: String): AnnotatedString {
    return runCatching {
        AnnotatedString.fromHtml(text)
    }.getOrDefault(AnnotatedString(text))
}
here is an example of the string "<font color='#DDDDDD'><b>Cat</b></font> and mouse are <b>friends</b> who loves <u>Kotlin</u>"
Not sure if it's everything you need... but it was mentioned recently
e
that's still android-only
c
whoops. sorry about that