TinyMCE:API/tinymce.Editor/onBeforeRenderUI
From Moxiecode Documentation Wiki
Contents |
[edit]
Event: onBeforeRenderUI
[edit]
Summary
This event gets executed before the user interface is rendered. This event enables you to override the ControlManager class and replace the instance of the default one before the UI is rendered. This way you can for example replace all buttons controls with some custom button control to make it more accessible for example.
[edit]
Syntax
event_callback(<tinymce.Editor> ed, <tinymce.ControlManager> cm)
[edit]
Parameters
- ed
- Sender object/Editor instance reference.
- cm
- ControlManager instance used to render the UI controls.
[edit]
Examples
// Adds an observer to the onBeforeRenderUI event using tinyMCE.init
tinyMCE.init({
...
setup : function(ed) {
ed.onBeforeRenderUI.add(function(ed, cm) {
console.debug('Before render: ' + ed.id);
});
}
});
// Adds an observer to the onBeforeRenderUI event using the render method
var ed = new tinymce.Editor('someid', {
.. Some settings
});
ed.onBeforeRenderUI.add(function(ed, cm) {
console.debug('Before render: ' + ed.id);
});
ed.render();
