拼写检查功能在Chrome中不起作用

问题描述:

我试图使用这种降价编辑器https://simplemde.com/,但在Chrome(其他浏览器中)自动拼写检查功能在编辑器区域内不起作用。拼写检查功能在Chrome中不起作用

我试图添加拼写检查和内容可编辑内部和元素(用于编辑),但它仍然无法正常工作。

有谁知道,在这种情况下如何启用拼写检查?

我知道男生们有他们自己的拼写检查工具,但它只支持英文。

+0

它只适用于'隐藏的工具栏和状态栏'编辑器。也许有一个JS配置你的失踪,就像spellcheck = true或其他。 – WebGuy

+0

只有他们自己的拼写检查器,而不是标准的浏览器检查器。 – guar47

根据Github Page,有一个名为spellChecker的拼写检查属性,它默认设置为true。您可以尝试手动将其设置为true(代码提供,以便我可以直接回答您的问题)。在github上显示

例子:

// Most options demonstrate the non-default behavior 
var simplemde = new SimpleMDE({ 
    autofocus: true, 
    autosave: { 
     enabled: true, 
     uniqueId: "MyUniqueID", 
     delay: 1000, 
    }, 
    blockStyles: { 
     bold: "__", 
     italic: "_" 
    }, 
    element: document.getElementById("MyID"), 
    forceSync: true, 
    hideIcons: ["guide", "heading"], 
    indentWithTabs: false, 
    initialValue: "Hello world!", 
    insertTexts: { 
     horizontalRule: ["", "\n\n-----\n\n"], 
     image: ["![](http://", ")"], 
     link: ["[", "](http://)"], 
     table: ["", "\n\n| Column 1 | Column 2 | Column 3 |\n| -------- | -------- | -------- |\n| Text  | Text  | Text  |\n\n"], 
    }, 
    lineWrapping: false, 
    parsingConfig: { 
     allowAtxHeaderWithoutSpace: true, 
     strikethrough: false, 
     underscoresBreakWords: true, 
    }, 
    placeholder: "Type here...", 
    previewRender: function(plainText) { 
     return customMarkdownParser(plainText); // Returns HTML from a custom parser 
    }, 
    previewRender: function(plainText, preview) { // Async method 
     setTimeout(function(){ 
      preview.innerHTML = customMarkdownParser(plainText); 
     }, 250); 

     return "Loading..."; 
    }, 
    promptURLs: true, 
    renderingConfig: { 
     singleLineBreaks: false, 
     codeSyntaxHighlighting: true, 
    }, 
    shortcuts: { 
     drawTable: "Cmd-Alt-T" 
    }, 
    showIcons: ["code", "table"], 
    spellChecker: false, 
    status: false, 
    status: ["autosave", "lines", "words", "cursor"], // Optional usage 
    status: ["autosave", "lines", "words", "cursor", { 
     className: "keystrokes", 
     defaultValue: function(el) { 
      this.keystrokes = 0; 
      el.innerHTML = "0 Keystrokes"; 
     }, 
     onUpdate: function(el) { 
      el.innerHTML = ++this.keystrokes + " Keystrokes"; 
     } 
    }], // Another optional usage, with a custom status bar item that counts keystrokes 
    styleSelectedText: false, 
    tabSize: 4, 
    toolbar: false, 
    toolbarTips: false, 
}); 

这是这里发生了什么:spellChecker: false,。所以请尝试将其设置为true,如本例所示。

+0

这使他们自己的拼写检查工作者只能使用英文。我正在寻找浏览器标准检查器。 – guar47

+0

可能会尝试获得一个插件,看看是否有效。像Grammerly Chrome扩展或类似的东西。 – WebGuy

+0

https://www.grammarly.com/ – WebGuy

我找到了家伙关闭拼写检查器并发表评论的地方。它有助于。 https://github.com/sparksuite/simplemde-markdown-editor/issues/630 感谢您的回答。