RichTextArea Inline Node Feedback
Jurgen Doll
jurgen at ivoryemr.co.za
Fri Oct 31 11:28:19 UTC 2025
Hi Andy
With regards to handling custom objects / inline nodes in RichTextArea,
I implemented two different models to test.
The one was by extending BasicTextModel and implementing my own custom
Content class for it. While with the other, I took your RichTextModel
and modified it to be able to handle objects implementing Supplier<Node>.
For each of these I extended RichTextArea in order to add additional API
to be able to append, insert, and replace custom objects.
Both of these approaches generally worked fine with regards to editing
and navigation. (Note I didn't handle any styling for the custom nodes
through the API.)
As expected though paste and undo/redo don't work due to
StyledTextModel's final replace method not handling INLINE_NODE's as
we've noted before.
Otherwise there are just two bugs/issues that I encountered that I'll
send separate emails for.
I made a GitHub repository of my efforts to share with you for your
reference in case you're interested. Feel free to copy/paste from it if
you want.
https://github.com/Jugen/RichTextAreaTest
Thanks, regards
Jurgen
More information about the openjfx-discuss
mailing list