我正在使用smartGWT的RichTextEditor,默认情况下它有7种不同的字体,但我想支持1种字体类型,而不是7种,但我想支持的字体不带RichTextEditor。如何从RichTextEditor设置支持的字体类型?
答案 0 :(得分:-1)
似乎他们没有在RichTextEditor API中公开大部分功能,但我相信可以通过执行以下操作来实现:
RichTextEditor rte = new RichTextEditor();
// remove the font controls
rte.setControlGroups("formatControls", "styleControls", "colorControls");
// set the base font for the editor, could also be done with a <span> tag
rte.setValue("<font face="Bookman Old Style, Book Antiqua, Garamond"></font>");