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.
*/
cleanup: function() {
if((typeof tinymce != 'undefined') && tinymce.EditorManager) {
var id;
for(id in tinymce.EditorManager.editors) {
tinymce.EditorManager.editors[id].remove();
}
tinymce.EditorManager.editors = {};
if((typeof tinymce != 'undefined') && tinymce.editors) {
$(tinymce.editors).each(function() {
if(typeof(this.remove) == 'function') {
this.remove();
}
});
}
},