mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02: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();
|
$(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();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user