smartGWT和RichTextEditor:如何设置可用的字体?

时间:2011-01-03 18:35:49

标签: gwt fonts smartgwt rich-text-editor

我正在使用smartGWT的RichTextEditor,默认情况下它有7种不同的字体,但我想支持1种字体类型,而不是7种,但我想支持的字体不带RichTextEditor。如何从RichTextEditor设置支持的字体类型?

1 个答案:

答案 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>");