1

デフォルトのスペルチェッカーをデフォルトでオンに設定することは可能ですか。毎回ツールバーのボタンをクリックせずに?

ブラウザでデフォルトのブラウザ スペル チェッカー機能を使用しています。

setup: function (ed) {
    ed.addCommand('mceSpellCheckRuntime', function() {
        t = ed.plugins.spellchecker;
        if (t.mceSpellCheckRuntimeTimer) {
          window.clearTimeout(t.mceSpellCheckRuntimeTimer);
        }
        t.mceSpellCheckRuntimeTimer = window.setTimeout(function() {
          t._done();
          t._sendRPC('checkWords', [t.selectedLang, t._getWords()], function(r) {
            if (r.length > 0) {
              t.active = 1;
              t._markWords(r);
              ed.nodeChanged();
            }
         });
       }, 3000); //3 seconds
    });


    ed.onInit.add(function(ed){
        ed.pasteAsPlainText = true;

        ed.execCommand('mceSpellCheckRuntime');
    });


    ed.onKeyUp.add(function(ed, e) {
        ed.execCommand('mceSpellCheckRuntime');
    });
},
4

2 に答える 2

1

その静かな可能性........:)

以下のコードを試してください.......

ed.onInit.add(function(ed, e) {
  setTimeout(function () {
  tinyMCE.activeEditor.controlManager.setActive('spellchecker', true);  tinymce.execCommand('mceSpellCheck', true);
 }, 1);
});
于 2014-06-03T11:08:22.087 に答える
0

いいえ、これは、tinymceでスペルチェッカーを使用する可能性が非常に多いため不可能です。ただし、ユーザーは、スペルチェッカーがチェックする必要のあるイベントを定義できます(これは既に行ったことです)。

于 2012-07-09T07:39:52.297 に答える