badsyntax / jquery-spellchecker

[not maintained] A lightweight jQuery plugin that can check the spelling of text within a form field or DOM tree.
http://jquery-spellchecker.badsyntax.co
MIT License
257 stars 113 forks source link

spell checker doesnt play well with multiple tiny_mce instances on the same page #58

Open batoure opened 11 years ago

batoure commented 11 years ago

spelling

I have been successfully using the jquery spellchecker plugin in several other areas of a site. However when I loaded several of them onto a page things quickly went bonkers. If you check the spelling in more than one box at a time the checker quickly gets confused and will freeze or unfreeze the pane on both boxes instead of the one you are working with.

I would guess that the issue at hand is somewhere in the top level jquery.spellchecker.js include that is watching for activity.

MAHESHHM commented 10 years ago

I made jquery spell checker to work on multiple ckeditors with the following changes, see if you can make similar changes to tinymce plugin

change toggle function in plugin.js to

toggle: function(editor) { var id; if(this.editor != undefined){ id = this.editor.id; if(id != editor.id) this.destroy(); }

this.editor = editor;
if (!this.spellchecker) {
  this.create();
} else {
  this.destroy();
}

}

This will solve the issue