我正在使用 smartGWT 的 RichTextEditor,默认情况下它带有 7 种不同的字体,但我只想支持 1 种字体类型,而不是 7 种,但我想要支持的字体不附带 RichTextEditor。如何从 RichTextEditor 设置支持的字体类型?
问问题
1226 次
1 回答
-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>");
于 2011-01-03T22:59:18.037 回答