简体   繁体   English

将拼写检查器集成到Tinymce中不起作用

[英]Integrating Spellchecker into Tinymce Not working

In my application I used tinymce editor for textareas. 在我的应用程序中,我使用了tinymce编辑器来编辑文本区域。

I want to integrate a spellchecker for that so I downloaded the plugin for spell checker and put it into the plugin folder. 我要为此集成一个拼写检查器,因此我下载了拼写检查器插件并将其放入插件文件夹。

Next I changed the code: 接下来,我更改了代码:

<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>

Now the editor is not showing, only the text area is displayed. 现在,编辑器未显示,仅显示了文本区域。 When I remove the name spellchecker from plugin then the editor loaded. 当我从插件中删除名称拼写检查器时,加载了编辑器。 What is the reason for this? 这是什么原因呢?

Is there any version problem here? 这里有版本问题吗?

This is the version details in tiny_mce_src.js file : 这是tiny_mce_src.js文件中的版本详细信息:

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

Possible duplicate: TinyMCE 4.0.5 spell check not working 可能重复: TinyMCE 4.0.5拼写检查不起作用

According to what I've found elsewhere, the spellchecker plugin was powered by Google service - which has been retired. 根据我在其他地方找到的信息,拼写检查程序插件由Google服务提供支持-已停用。 So at this time there does not appear to be an integrated TinyMCE spellchecker solution. 因此,目前似乎还没有集成的TinyMCE拼写检查器解决方案。

However, you CAN enable the browser's built-in spellchecker by doing the following: 但是,您可以通过执行以下操作来启用浏览器的内置拼写检查器:

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

Be sure to remove spellchecker from your toolbar and your plugins list. 确保从工具栏和插件列表中删除拼写检查器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM