any one can help me to find way to convert HTML to...
# android
h
any one can help me to find way to convert HTML to text by kotlin
m
You can use Ksoup
Copy code
val htmlText = "<p>Hello world!</p>"
var text = ""
val handler = KsoupHtmlHandler
    .Builder()
    .onText {
        text += it
    }
val parser = KsoupHtmlParser(handler)

parser.write(htmlText)
parser.end()
🌹 1