InlineCssTextArea(RichTextFX)目前的风格?

时间:2016-11-02 15:10:28

标签: javafx richtextfx

我试图在javafx中使用RichTextFX库组件:InlineCssTextArea来实现富文本编辑器之类的东西。

我预计API会与此类似:

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

但似乎所有样式更改都必须应用于一系列字符。我错过了什么?这个用例似乎是最自然的。

我是否必须跟踪当前的Carret位置,并相应地应用更改?

0 个答案:

没有答案