Testing JavaFX incubator RichTextArea using two different models to accommodate custom nodes:
(For both of these I separately extended RichTextArea for each to add the following common API to append, insert, replace, and getParagraphSegments, all for inline nodes but with differing signatures.)
-
Extending BasicTextModel with the use of AbstractSegments to handle the custom nodes.
This is just a reworking of the method I was using with RichTextFX in my own application.
See src/basic/CustomSegmentDemo for a simple demonstration. -
Reworking JavaFX's own internal RichTextModel to handle custom nodes internally.
Also uses AbstractSegments but mainly just as the Supplier.
See src/rich/CustomSupplierDemo for a simple demonstration.
Note: that in neither of these two models have I properly handled styling of the custom Nodes through the RichTextArea API.
There are currently a few problems in the JavaFX implementation that need to be fixed regardless of the model used:
- Copy and paste of INLINE_NODEs doesn't work ?
- Undo and Redo of INLINE_NODEs doesn't work ?