0

私はsmartgwtプロジェクトでtinymce-gwtを使用しています。パネルを作成し、そのパネルにテキストエリアアイテムを追加してから、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);
    }
}-*/;
4

1 に答える 1

1

私はあなたが試みていることをしているように見えるこの他の2つのプロジェクトを見ることをお勧めします。

http://code.google.com/p/gwt-html-editor/source/browse/branches/gwt1.4/src/com/gc/gwt/wysiwyg/client/tinymce/TinyMCE.java?r=89

またはこれ:

http://code.google.com/p/tinymce-gwt/source/browse/trunk/tinymce-gwt/tinymceGwt/src/gr/open/client/TinyMCE.java

于 2012-05-12T09:11:49.443 に答える