smartGWTのRichTextEditorを使用しており、デフォルトで7種類のフォントが付属していますが、サポートしたいフォントタイプは7つではなく、1つだけですが、サポートしたいフォントは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 に答える