BUGFIX Added 'mceRemoveControl' calls to TinyMCE logic in CMS in order to reinitialise editors properly after replacing the panels via ajax

This commit is contained in:
Ingo Schommer 2011-10-29 11:43:02 +02:00
parent d1ce2c07c0
commit a5652ab3aa

View File

@ -87,13 +87,6 @@
$(this).remove(); $(this).remove();
}); });
// Remove all TinyMCE instances
if((typeof tinymce != 'undefined') && tinymce.editors) {
$(tinymce.editors).each(function() {
if(typeof(this.remove) == 'function') this.remove();
});
}
this._super(); this._super();
}, },
@ -212,6 +205,14 @@
var inst = tinyMCE.getInstanceById(this.attr('id')); var inst = tinyMCE.getInstanceById(this.attr('id'));
if (inst) inst.startContent = tinymce.trim(inst.getContent({format : 'raw', no_events : 1})); if (inst) inst.startContent = tinymce.trim(inst.getContent({format : 'raw', no_events : 1}));
}; };
this._super();
},
onunmatch: function() {
tinyMCE.execCommand("mceRemoveControl", true, this.attr('id'));
this._super();
} }
}); });
}); });