RichTextArea feedback and suggestions

mkpaz quizynox at gmail.com
Sat Aug 2 16:42:31 UTC 2025


Hello,

I’ve been testing the new RichTextArea control and encountered a few 
issues. Some may not be bugs, though I couldn't find existing reports, 
so I’m sharing them here.

- The cursor doesn’t change from TEXT to DEFAULT when hovering over the 
scrollbar.

https://drive.google.com/file/d/1ob_2d-abI4F0bVoNWVS6d51rwYTt3-1n/view?usp=drive_link

- Setting font-family doesn’t work in CoreArea (but works in RichTextArea)

.rich-text-area .content,  // only this line works
.code-area .content,
.code-area .content .label,
.code-area .content TextFlow {
     -fx-font-family: "JetBrains Mono";
     -fx-font-size: 14px;
}

I also hope there is room left for small enhancements:

- RichParagraph.getSegments() is abstract and package-private and a part 
of public API.

   Judging from API it's suposed to be extensible, otherwise it's not 
possible to create a custom model.
https://github.com/openjdk/jfx/blob/master/modules/jfx.incubator.richtext/src/main/java/jfx/incubator/scene/control/richtext/model

https://github.com/openjdk/jfx/blob/master/modules/jfx.incubator.richtext/src/main/java/jfx/incubator/scene/control/richtext/model/SimpleViewOnlyStyledModel.java#L354

- RichTextArea lacks the ability to set common editor settings directly 
or via looked-up colors. I've created a project that brings TextMate 
support to RTA, so I'm obtaining editor's background, text color and 
highlight color from the theme settings.

https://github.com/mkpaz/tm4javafx/blob/master/tm4javafx/src/main/java/tm4javafx/richtext/StyleHelper.java#L75


Thanks for adding RichText support to JavaFX! Should I report all these 
issues in JBS?

Best regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20250802/4cf65f83/attachment.htm>


More information about the openjfx-dev mailing list