TinyMCE:API/tinymce.Editor/onLoadContent
From Moxiecode Documentation Wiki
Contents |
[edit]
Event: onLoadContent
[edit]
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.
[edit]
Syntax
event_callback(<tinymce.Editor> ed, <Object> o)
[edit]
Parameters
- ed
- Sender object/Editor instance that is serializing an element.
- o
- Object containing things like the element that contents was loaded from.
[edit]
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();
