mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #4097 from tractorcow/pulls/3.1/fix-tinymce
BUG Fix tinymce errors crashing CMS
This commit is contained in:
commit
b823d2df88
@ -293,8 +293,15 @@ ss.editorWrappers['default'] = ss.editorWrappers.tinyMCE;
|
||||
onremove: function() {
|
||||
var ed = tinyMCE.get(this.attr('id'));
|
||||
if (ed) {
|
||||
try {
|
||||
ed.remove();
|
||||
} catch(ex) {}
|
||||
try {
|
||||
ed.destroy();
|
||||
} catch(ex) {}
|
||||
|
||||
// Remove any residual tinyMCE editor element
|
||||
this.next('.mceEditor').remove();
|
||||
|
||||
// TinyMCE leaves behind events. We should really fix TinyMCE, but lets brute force it for now
|
||||
$.each(jQuery.cache, function(){
|
||||
|
Loading…
Reference in New Issue
Block a user