In compose-web there should be an easy way to disp...
# compose-web
g
In compose-web there should be an easy way to display plain HTML rich text, right? How do I do that, though? 😄
s
Compose for Web is essentially the same as on other platforms, just compiled to WebAssembly. Since it's cross-platform, I don't think there's anything unique about it specifically for the web, it's designed to work consistently across all platforms.
👍 1
g
Sure, sure, that's why I use
div
and
span
in all my Android composable code.
c
Where do you use
div
and
span
in your android code?
g
That was just sarcastic comment to obviously false statement.
👎 2
c
It’s not a false statement - you cannot use html in compose web. It uses a Canvas to „draw“ your composables. No HTML involved in the whole process of rendering Composables.
If you want to render HTML you can have a look at „Compose HTML“ and libraries like „kobweb“. But those are not Multiplattform and are more like Angular and React.
g
I would like to display some rich text in WASM/JS project. Text resources on Android support some basic tags (I haven't tried that in WASM/JS), but I would like more than that, things like headers, bullet points etc.
With as little effort as possible.
c
There is a search engine called Google and the first hit when searching for „compose rich text“ reveales https://mohamedrejeb.github.io/compose-rich-editor/ Ps: read this in a sarcastic way as you did before 😉
😁 2
g
Well, if it wasn't editor but displayer, it would fit perfectly.
c
If it can edit there should be a way to display as it need to parse the editor content.