TinyMCE:API/tinymce.Editor/onLoadContent

From Moxiecode Documentation Wiki

Jump to: navigation, search

Contents

Event: onLoadContent

Summary

This event gets executed when the load method is called. This event occurs after contents have been loaded from the textarea or div element that got converted into an editor instance.

Syntax

event_callback(<tinymce.Editor> ed, <Object> o)

Parameters

ed
Sender object/Editor instance that is serializing an element.
o
Object containing things like the element that contents was loaded from.

Examples

// Adds an observer to the onLoadContent event using tinyMCE.init
tinyMCE.init({
   ...
   setup : function(ed) {
      ed.onLoadContent.add(function(ed, o) {
          // Output the element name
          console.debug(o.element.nodeName);
      });
   }
});

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

ed.onLoadContent.add(function(ed, o) {
   // Output the element name
   console.debug(o.element.nodeName);
});

ed.render();
Personal tools