TinyMCE:API/tinymce.Editor/onBeforeGetContent

From Moxiecode Documentation Wiki

Jump to: navigation, search

Contents

Event: onBeforeGetContent

Summary

This event gets executed when the getContent method is called but before the contents gets serialized and returned.

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 format.

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();
Personal tools