TinyMCE:API/tinymce.Editor/onInit

From Moxiecode Documentation Wiki

Jump to: navigation, search

Contents

Event: onInit

Summary

This event gets executed after the editor has finished all it's initialization i.e. when it's ready to use.

Syntax

event_callback(<tinymce.Editor> ed)

Parameters

ed
Sender object/Editor instance reference.

Examples

// Adds an observer to the onInit event using tinyMCE.init
tinyMCE.init({
   ...
   setup : function(ed) {
      ed.onInit.add(function(ed) {
          console.debug('Editor is done: ' + ed.id);
      });
   }
});

// Adds an observer to the onInit event using the render method
var ed = new tinymce.Editor('someid', {
   .. Some settings
});

ed.onInit.add(function(ed) {
   console.debug('Editor is done: ' + ed.id);
});

ed.render();
Personal tools