BUGFIX: Fixed tinymce cleanup

This commit is contained in:
phalkunz 2011-04-05 11:54:01 +12:00
parent 2e71dea3b6
commit 83f6c82639

View File

@ -261,12 +261,12 @@
* Note: Everything that calls this externally has an inappropriate coupling to TinyMCE. * Note: Everything that calls this externally has an inappropriate coupling to TinyMCE.
*/ */
cleanup: function() { cleanup: function() {
if((typeof tinymce != 'undefined') && tinymce.EditorManager) { if((typeof tinymce != 'undefined') && tinymce.editors) {
var id; $(tinymce.editors).each(function() {
for(id in tinymce.EditorManager.editors) { if(typeof(this.remove) == 'function') {
tinymce.EditorManager.editors[id].remove(); this.remove();
} }
tinymce.EditorManager.editors = {}; });
} }
}, },