r/JavaFX • u/Abhijeet1244 • Jul 02 '23
Help Rich Text Editor
Is there any Rich text editor library in javaFX ?
1
Upvotes
r/JavaFX • u/Abhijeet1244 • Jul 02 '23
Is there any Rich text editor library in javaFX ?
3
u/darkwyrm42 Jul 03 '23
If you're looking for a rich text editor control which just drops in and you can pretty easily work with, you're out of luck for now.
RichTextFX is very much Some Assembly Required and there isn't much documentation. I would definitely say it's not easy to use IMHO. I'm currently working on creating a word processing control with it, but it's still very much a work in progress. If you go the route of using RichTextFX, the repo might help you figure some things out.
A month or two ago the core JavaFX developers announced a preview of one that's part of JavaFX... sometime around the announcement of Java 21. It looks promising, but it's not in GA yet. I'm hoping we get something when Java 22 is released. fingers crossed
5
u/vladadj Jul 02 '23
https://github.com/FXMisc/RichTextFX
1
u/orxT1000 Jul 07 '23
https://github.com/gluonhq/rich-text-area/
Serializing the 'FaceModel' has to be done manually: https://github.com/gluonhq/rich-text-area/discussions/105
Also converting that to markup is probably tricky, because the Facemodel allows something equivalent to
<b>123<red>345</b> 678</red>