TinyMCE:API/tinymce.Editor/onActivate
From Moxiecode Documentation Wiki
Contents |
[edit]
Event: onActivate
[edit]
Summary
This event gets executed an editor is activated/focused by the user.
[edit]
Syntax
event_callback(<tinymce.Editor> ed, <tinymce.Editor> oed)
[edit]
Parameters
- ed
- Sender object/Editor instance reference.
- oed
- Previously actived editor, this can be undefined if no editor was before the current one.
[edit]
Examples
// Adds an observer to the onActivate event using tinyMCE.init
tinyMCE.init({
...
setup : function(ed) {
ed.onActivate.add(function(ed) {
console.debug('Editor was activated: ' + ed.id);
});
}
});
// Adds an observer to the onActivate event using the render method
var ed = new tinymce.Editor('someid', {
.. Some settings
});
ed.onActivate.add(function(ed) {
console.debug('Editor was activated: ' + ed.id);
});
ed.render();
