TinyMCE:API/tinymce.Editor/onPreInit

From Moxiecode Documentation Wiki

Jump to: navigation, search

Contents

Event: onPreInit

Summary

The pre init event gets executed before all DOM events are assigned to the editor. It enables you to add custom DOM events since this might be problemation later on then it's in the designMode state.

Syntax

event_callback(<tinymce.Editor> ed)

Parameters

ed
Sender object/Editor instance reference.

Examples

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

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

ed.onPreInit.add(function(ed) {
   console.debug('PreInit: ' + ed.id);
});

ed.render();
Personal tools