Building Custom TextArea in JavaFX

Viewed 1537

I would like to build a custom TextArea (or a Text objects...). Here are the limitations I found in the currently available nodes:

TextArea: provide functionality to apply font styles, select, and "getSelected" text. but it does not allow for applying different style to sub-Strings. A style is applied to the whole TextArea.

HTMLEditor: provides means to apply different styles, but not ways to get what string the user selected.

TextFlow: Allows to program different styles to strings. But it is like a label. Not interactive.

I need something a Text Area where users can type, selected, and my code would know what they selected to give them option to apply font styles to the selected string. So I guess what I need a custom object.

Do you agree? How do I go about that?

1 Answers
Related