Goal:
Provide a mechanism for styling of rich text paragraph highlights with CSS [0].
Currently, the highlights can be added via
- RichParagraph.Builder.addHighlight(int start, int end, Color color)
- RichParagraph.Builder.addWavyUnderline(int start, int end, Color color)
There should be methods added that allow for styling the highlights via CSS, something like this:
- RichParagraph.Builder.addHighlight(int start, int end, String ... styles)
- RichParagraph.Builder.addWavyUnderline(int start, int end, String ... styles)
Additionally, we may consider adding other kinds of highlights (double, dotted, dashed), allow for customization beyond the line color, such as wave radius, or even allow for custom highlights.
edit 2025/05/07: clarify which RichParagraph.Builder methods accept the character attributes and styles and which accept the paragraph ones.
REFERENCES
[0] https://mail.openjdk.org/pipermail/openjfx-dev/2025-April/053906.html
[1] https://www.w3schools.com/cssref/pr_text_text-decoration.php
Provide a mechanism for styling of rich text paragraph highlights with CSS [0].
Currently, the highlights can be added via
- RichParagraph.Builder.addHighlight(int start, int end, Color color)
- RichParagraph.Builder.addWavyUnderline(int start, int end, Color color)
There should be methods added that allow for styling the highlights via CSS, something like this:
- RichParagraph.Builder.addHighlight(int start, int end, String ... styles)
- RichParagraph.Builder.addWavyUnderline(int start, int end, String ... styles)
Additionally, we may consider adding other kinds of highlights (double, dotted, dashed), allow for customization beyond the line color, such as wave radius, or even allow for custom highlights.
edit 2025/05/07: clarify which RichParagraph.Builder methods accept the character attributes and styles and which accept the paragraph ones.
REFERENCES
[0] https://mail.openjdk.org/pipermail/openjfx-dev/2025-April/053906.html
[1] https://www.w3schools.com/cssref/pr_text_text-decoration.php
- relates to
-
JDK-8351982 ☂ RichTextArea (Incubator) Feedback and Bugs in jfx24
-
- Open
-
- links to
-
Review(master) openjdk/jfx/1802