Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8355774

RichTextArea: provide mechanism for CSS styling of highlights

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • jfx24
    • javafx
    • None

      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.

      REFERENCES

      [0] https://mail.openjdk.org/pipermail/openjfx-dev/2025-April/053906.html
      [1] https://www.w3schools.com/cssref/pr_text_text-decoration.php

            angorya Andy Goryachev
            angorya Andy Goryachev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: