2

私のアプリケーションでは、テキストエリアに tinymce エディターを使用しました。

そのためのスペルチェッカーを統合したいので、スペルチェッカー用のプラグインをダウンロードしてプラグインフォルダーに入れました。

次に、コードを変更しました。

<script type="text/javascript">
    tinyMCE.init({
        // General options
        mode : "textareas",
        theme : "advanced",
        plugins : "advlink,paste,spellchecker",

        // Theme options
        theme_advanced_buttons1 : "bold,italic,underline,separator,forecolor,strikethrough,justifyleft,justifycenter,justifyright, justifyfull,bullist,numlist,undo,redo,link,unlink",
        theme_advanced_buttons2 : "spellchecker,cut,copy,paste,pastetext,fontselect,fontsizeselect,code",
        theme_advanced_buttons3 : "",

        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
        theme_advanced_statusbar_location : "bottom",
        theme_advanced_resizing : true,
        spellchecker_languages : "+English=en,Swedish=sv",

        // Example content CSS (should be your site CSS)
        content_css : "css/content.css",

        // Drop lists for link/image/media/template dialogs
        template_external_list_url : "lists/template_list.js",
        external_link_list_url : "lists/link_list.js",
        external_image_list_url : "lists/image_list.js",
        media_external_list_url : "lists/media_list.js",

        // Replace values for the template plugin
        template_replace_values : {
            username : "Some User",
            staffid : "991234"
        }
    });
</script>

現在、エディタは表示されておらず、テキスト領域のみが表示されています。プラグインから名前のスペルチェッカーを削除すると、エディターが読み込まれました。これの理由は何ですか?

ここにバージョンの問題はありますか?

これは tiny_mce_src.js ファイルのバージョンの詳細です:

    majorVersion : '3',
minorVersion : '1.0.1',
releaseDate : '2008-06-18',
4

1 に答える 1

1

重複の可能性: TinyMCE 4.0.5 スペル チェックが機能しない

他の場所で見つけたものによると、スペルチェッカー プラグインは Google サービスを利用していましたが、これは廃止されました。そのため、現時点では統合された TinyMCE スペルチェッカー ソリューションはないようです。

ただし、次の操作を行うことで、ブラウザーの組み込みスペルチェッカーを有効にすることができます。

tinymce.init({
    browser_spellcheck : true,
});

ツールバーとプラグイン リストからスペルチェッカーを必ず削除してください。

于 2014-01-16T21:53:45.950 に答える