我正在使用 RichTextFx (CodeArea) 来突出显示我的代码。我想更改某些关键字的文本背景颜色并使用下面的 css:
.parameter {
-rtfx-background-color: yellow;
}
But it's changes background color for all text between my keywords (:p1
and :p2
in this example). Font color and style change successfully.
use StyleClassedTextArea.setStyleClass(from, to, "class Name");
将类名添加到某个特定范围。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)