Skip to content

Jugen/RichTextAreaTest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RichTextAreaTest

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.)

  1. 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.

  2. 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.

Problems

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 ?
  • When an INLINE_NODE is the last element in a paragraph then the caret doesn't show beyond it but before it ?
  • requestLayout doesn't propagate upwards past TextCell to VFlow, so if for example a Label is selected and its text changes then the Label updates but the selection doesn't ?
  • Caspian CSS entries are missing.

About

Testing JavaFX incubator RichTextArea using two different models

Resources

License

Stars

Watchers

Forks