TinyMCE:API/tinymce.Editor/onActivate

From Moxiecode Documentation Wiki

Jump to: navigation, search

Contents

Event: onActivate

Summary

This event gets executed an editor is activated/focused by the user.

Syntax

event_callback(<tinymce.Editor> ed, <tinymce.Editor> oed)

Parameters

ed
Sender object/Editor instance reference.
oed
Previously actived editor, this can be undefined if no editor was before the current one.

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();
Personal tools