TinyMCE:API/tinymce.Editor/onBeforeGetContent
From Moxiecode Documentation Wiki
Contents |
[edit]
Event: onBeforeGetContent
[edit]
Summary
This event gets executed when the getContent method is called but before the contents gets serialized and returned.
[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 format.
[edit]
Examples
// Adds an observer to the onBeforeGetContent event using tinyMCE.init
tinyMCE.init({
...
setup : function(ed) {
ed.onBeforeGetContent.add(function(ed, o) {
console.debug('Before get content.');
});
}
});
// Adds an observer to the onBeforeGetContent event using the render method
var ed = new tinymce.Editor('someid', {
.. Some settings
});
ed.onBeforeGetContent.add(function(ed, o) {
console.debug('Before get content.');
});
ed.render();
