mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
parent
d1ce2c07c0
commit
a5652ab3aa
@ -87,13 +87,6 @@
|
||||
$(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();
|
||||
},
|
||||
|
||||
@ -212,6 +205,14 @@
|
||||
var inst = tinyMCE.getInstanceById(this.attr('id'));
|
||||
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();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user