javafxtext-stylingrichtextfx

problem with append text with style in richtextfx


i want to append specific text with style in StyleClassedTextArea in richtextfx using method append(String text, String sytleClass) but there was a problem

StyleClassTextArea textarea=new StyleClassedTextArea();
textarea.appendText("no-style");
textarea.append("with-style","error");
textarea.appendText("no-style");

i think the output would be (for the style i used bold text)

no-style with-style no-style

but the actual output is

no-style with-style no style

It apply style to all text that added later
so, what is the solution for this?


Solution

  • I issued this in rihtextfx github page
    see this issue for more details richtextfx issue-938