簡體   English   中英

將拼寫檢查器集成到Tinymce中不起作用

[英]Integrating Spellchecker into Tinymce Not working

在我的應用程序中,我使用了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',

可能重復: TinyMCE 4.0.5拼寫檢查不起作用

根據我在其他地方找到的信息,拼寫檢查程序插件由Google服務提供支持-已停用。 因此,目前似乎還沒有集成的TinyMCE拼寫檢查器解決方案。

但是,您可以通過執行以下操作來啟用瀏覽器的內置拼寫檢查器:

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

確保從工具欄和插件列表中刪除拼寫檢查器。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM