How to create an editor in Jetpack Compose?

Viewed 1148

Jetpack compose provides lots of material components like TextField etc. However, to build something like a file editor, what kind of component can be used that supports multiple lines of text any long with text operations like selecting text, cut-copy-paste, etc.

Would be interested to know equivalent component for Jetpack compose desktop as well.

3 Answers

For Compose Desktop, you can use a Swing component like RSTextArea

I wrote a blog post about how to embed it.

Android EditText can be a good option for code editor, you can make a custom edittext and use it inside compose's AndroidView

Compose's AndroidView can also infalte ui from xml file

Related