[External] : RichTextArea styling feedback
Andy Goryachev
andy.goryachev at oracle.com
Tue Aug 26 18:06:27 UTC 2025
Dear Jurgen:
This is great feedback, thank you very much - for the feedback and for the effort trying out RichTextArea!
Let me sort through all the suggestions and I'll respond later with the JBS tickets.
For some reason, I could not see your message in the archives https://mail.openjdk.org/pipermail/openjfx-discuss/2025-August/date.html
Let's see if this one makes it through.
Cheers,
-andy
From: Jurgen Doll <jurgen at ivoryemr.co.za>
Date: Tuesday, August 26, 2025 at 08:06
To: Andy Goryachev <andy.goryachev at oracle.com>, openjfx-discuss at openjdk.org <openjfx-discuss at openjdk.org>
Subject: [External] : RichTextArea styling feedback
Hi Andy
I've been looking at the RichTextArea incubator feature and am providing feedback wrt the styling aspect of it.
First off though, thank you for all the effort you have put into this so far and I'm looking forward to when this matures.
Some background: since I use the RichTextFX library in my real world application I wanted to see how easily I could refactor my application to use RichTextArea instead, and then provide you with feedback. Here I'm focusing just on a simple editor control in my application that has some basic styling options (bold, italic, underline, and text color) available for the user while the editor indicates any misspelled words as they type with a wavy underline.
I used a standard RichTextArea with its default RichTextModel and you'll be pleased to hear that without too much fuss I was able to read & write using StyledInput & StyledOutput, as well as convert the styling options part of my text editor control. However styling for spellchecking didn't go as well.
So based off my experience with trying various things I recommend the following API enhancements:
1.
The following StyleAttributes should be added to StyleAttributeMap: INLINE_STYLE, STYLE_NAMES, TEXT_HIGHLIGHT, and WAVY_UNDERLINE. At the moment none of these are easily or directly available, and I believe from a user perspective that they should be.
2.
Consider splitting StyleAttributes into TextAttributes and ParagraphAttributes then INLINE_STYLE and STYLE_NAMES can appear in both. Possibly then also have a DecoratorAttribute if needed for TEXT_HIGHLIGHT and WAVY_UNDERLINE, if that'll make implementation easier but it should I believe from a user perspective still go into/through StyleAttributeMap as all styling should preferably be in one place.
3.
The methods applyStyle and setStyle in RichTextArea should have a boolean undo parameter like replaceText.
There's also the following issue that I noticed. When typing text, in the middle of a sentence, to extend a word that's styled then the typed text is not being inserted using the styles of the preceding text.
There are some other obervations regarding other aspects of RichTextArea that I hope to give feedback on soon as well.
Thanks again, regards
Jurgen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-discuss/attachments/20250826/0101cd6f/attachment.htm>
More information about the openjfx-discuss
mailing list