我在smartgwt项目中使用tinymce-gwt。我写了一些代码来创建一个面板&将textarea项添加到该面板&然后加载tinymce编辑器。它运作良好&我可以正确加载它&它显示了所有想要的按钮。但我有一个问题,即没有工具栏按钮工作(点击它们没有任何反应)。这是我用来初始化TinyMCE的原生GWT方法:
protected native void init(String id) /*-{
try{
$wnd.tinyMCE.init({
mode: "exact",
elements: id,
theme : "advanced",
theme_advanced_buttons1 : "fontselect,fontsizeselect,formatselect,bold,italic,underline,strikethrough,separator,sub,sup,separator,cut,copy,paste,undo,redo",
theme_advanced_buttons2 : "justifyleft,justifycenter,justifyright,justifyfull,separator,numlist,bullist,outdent,indent,separator,forecolor,backcolor,separator,hr,link,unlink,jbimages,image,table,separator,asciimath,asciimathcharmap,asciisvg",//media, code
theme_advanced_buttons3 : "",
theme_advanced_fonts : "Arial=arial,helvetica,sans-serif,Courier New=courier new,courier,monospace,Georgia=georgia,times new roman,times,serif,Tahoma=tahoma,arial,helvetica,sans-serif,Times=times new roman,times,serif,Verdana=verdana,arial,helvetica,sans-serif",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
relative_urls : false,
plugins : 'jbimages,asciimath,asciisvg,table,inlinepopups,media',
AScgiloc : '/tinyMCE/plugins/asciisvg/php/svgimg.php',
ASdloc : 'plugins/asciisvg/js/d.svg',
content_css : "css/content.css"
});
}catch(e){
alert(e);
}
}-*/;