Hi, this question is more about guidance because I...
# compose
a
Hi, this question is more about guidance because I'm not sure where to start. I have a
TextField
, and to highlight of the text with colours, say given a list of words to highlight. Basically - syntax highlighting. The image attached gives you an idea of what I mean. Would I have to make my own
TextField
component for this?
d
Have a look at
VisualTransformation
for adding colours.
🙏 1
t
a
Oh, I had no idea about the Compose Desktop examples. Thanks!
t
It uses a Text element not TextField but i think the highliting also works in TextField. See: EditorView.kt:LineContent
👍 1
s
We don't have support for multi-style text editing yet, hopefully soon this would be possible without VisualTransformation.