1

I'm trying to achieve something like rich text editor in javafx, using RichTextFX library component: InlineCssTextArea.

I've expect an API similar to this:

InlineCssTextArea area = new InlineCssTextArea();
area.setStyle("-fx-font-weight: bold;");
//now user input is bold
area.setStyle("text-decoration: underline;");
//now user input is bold and underlined
area.setStyle("-fx-font-weight: normal;");
//now user input is just underlined

But it seems, that all style changes has to be applied to a range of characters. Did I miss something? This use case seems to be the most natural one.

Do I have to track current carret position, and apply changes accordingly?

Dejwi
  • 4,393
  • 12
  • 45
  • 74

0 Answers0