简体   繁体   English

TinyMCE浏览器拼写检查

[英]TinyMCE Browser Spell Check

I am using TinyMCE, and I am using the browser's built in spell checker. 我正在使用TinyMCE,并且正在使用浏览器的内置拼写检查器。 The issue that I am having, and I don't know if I have any control over is the spell checker: 我遇到的问题,而且我不知道我是否有任何控制权,这是拼写检查器:

  • Doesn't replace all words after right click -> select new word right click -> select new word后不会替换所有right click -> select new word
    • It will replace some words in the document 它将替换文档中的某些单词
    • Some words it do not change at all and the browser keeps saying the word is spelt wrong. 有些单词根本不会改变,浏览器一直在说单词拼写错误。 To fix the error you need to manually change the spelling. 要解决该错误,您需要手动更改拼写。
  • Doesn't always show that there is an error the the text 并非总是显示文本有错误

Here is how I am configuring the editor: 这是我配置编辑器的方式:

tinymce.init({
    selector: "#savedstory",
    theme: "modern",
    height: 450,
    browser_spellcheck: true,
    gecko_spellcheck: true,
    plugins: [
        "advlist autolink lists link image charmap print preview hr anchor pagebreak",
        "searchreplace wordcount visualblocks visualchars code fullscreen",
        "insertdatetime media nonbreaking save table directionality",
        "emoticons template paste textcolor"
    ],
    toolbar1: "insertfile undo redo | styleselect | bold italic underline | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media",
    toolbar2: "print preview fullscreen | cut copy paste | removeformat"
});

Does anyone have any suggestions to fix this? 有没有人建议解决此问题? I am not looking for browser plugins or configurations either. 我也不在寻找浏览器插件或配置。

Can you add the below code in your init 您可以在初始化中添加以下代码吗?

setup : function(ed) {
                ed.on('init', function(evt) {
                  ed.getBody().setAttribute('spellcheck', true);
                });
}

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

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