2017-09-06 18 views
0

このマークダウンエディタhttps://simplemde.com/を使用しようとしていますが、Chrome(他のブラウザも同様)では自動スペルチェックがエディタ領域内で機能していません。スペルチェックはChromeで動作しません

私は内部で編集可能なスペルチェックとコンテンツを追加しようとしましたが(編集に使用されています)、まだ動作していません。

誰でも知っていますか、この場合スペルチェックを有効にする方法はありますか?

私は自分のスペルチェッカーを持っていることを知っていますが、英語のみをサポートしています。

+0

「非表示のツールバーとステータスバー」エディタでのみ機能します。たぶんspellcheck = trueか何かのようなあなたの行方不明のjs設定があります。 – WebGuy

+0

標準のブラウザチェッカーではなく、スペルチェッカーだけです。 – guar47

答えて

0

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,。したがって、この例に示すように、実際に設定してみてください。

+0

英語のみで動作する独自のスペルチェッカーを有効にしています。私はブラウザの標準チェッカーを探しています。 – guar47

+0

プラグインを入手して、動作するかどうかを確認してください。 Grammerly Chrome拡張機能のようなもの。 – WebGuy

+0

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

関連する問題