From 83f6c826397a6d8592289ee95f8bca11fcc44c13 Mon Sep 17 00:00:00 2001 From: phalkunz Date: Tue, 5 Apr 2011 11:54:01 +1200 Subject: [PATCH] BUGFIX: Fixed tinymce cleanup --- admin/javascript/LeftAndMain.EditForm.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/admin/javascript/LeftAndMain.EditForm.js b/admin/javascript/LeftAndMain.EditForm.js index 7b5108386..52d8ada87 100644 --- a/admin/javascript/LeftAndMain.EditForm.js +++ b/admin/javascript/LeftAndMain.EditForm.js @@ -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(); + } + }); } },