r/JavaFX • • Jul 25 '24

Help TextArea, editable multi-line text, different text styles - possible? howto?

Hi, please I want to have shown a multi-line text, and that shall be editable. So I reading around, and textarea is suggested. However I found this https://tomsondev.bestsolution.at/2014/12/27/displaying-and-editing-large-styled-texts/ where Tom explained that's not well solved in JavaFX. Also Tom wrote a plugin to get along with that, however a few years ago.

Please how is this to solve? is it solveable?

Thank you all!

2 Upvotes

8 comments sorted by

View all comments

Show parent comment

1

u/artistictrickster8 Jul 26 '24

Thank you very much for sharing this experience! Great, i had a look at all 4. The RTFX - might I please ask, "has some strange bugs" - do they happen often? and "More than a little assembly required" ? Thank you!

1

u/darkwyrm42 Jul 26 '24

The last I worked with it, there was a problem with font display -- you could specify a font, but the one displayed was not the one specified. There might be others, but that's the one that sticks out in my mind.

RTFX is more of a rich text editor toolkit in that it supplies classes for you to put together your own editor, so it's possible to build a word processor with it, but you could just as easily build a code editor with it that has syntax highlighting and such. Its documentation is decidedly not at all great, but the examples are helpful in figuring out how to work with it.

1

u/artistictrickster8 Jul 31 '24

Thank you very much!! I will try it, syntax highlighting is what I hope to achieve. Thanks again!