JDK-8091033 : [RichTextEditor] Allow rich text in text fields
  • Type: Enhancement
  • Component: javafx
  • Sub-Component: controls
  • Affected Version: fx2.0
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2011-09-03
  • Updated: 2018-09-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Relates :  
Description
It is sometimes necessary to style individual words or characters of a text field. Examples include 

1. Underlining invalid parts of input (misspelled words with a wavy underline for instance)
2. Emphasizing something as being a recognized entity such as a key as in: "Employee *234765*". 

One way of doing this would be to allow support for the <span> tag as if the document model was HTML. This would allow me to decouple the styling into a .css file. Usage example:

messageTextField.setText("Let's go out <span class="misspelled>tonght</span>");

Comments
I changed "formatted" to "rich" to avoid confusion with "input text masks" etc.
06-06-2014

I'm not going to get to this in 8.0 I'm afraid, but will try again for 8.1. Mark Claassen submitted some API designs and had some code for this in openjfx dev and I won't let that go to waste.
23-01-2013

To illustrate the importance of this issue, I would like to give an example from our application. Ask yourself, what the following contents, shown in a text field means: 16:15:14 Not everyone will guess this to be a time of day, specifically 4:15 PM with second precision of 14 seconds. However, had the field contained the following 16:15 more people would immediately recognize this as a time of day, since many alarm clocks, TV channels, smartphones, etc display a time of day using two numbers separated by a colon. For this reason I would like to render our second precision time 16:15:14 in such a way that the seconds are shown more discretely. This could be done by rendering :14 with a dimmer color, or with a lighter font. (which would require this feature request to be implemented)
15-06-2012

This issue is related to http://javafx-jira.kenai.com/browse/RT-16508 but it seems I do not have the rights to link issues.
03-09-2011