tags:

views:

20

answers:

1

I want to write function that saves the content of tiny mce and destroys the current instance of tiny mce which will be called when the mce looses focus.

A: 

Something like this should work:

// Code to be inserted into the init function of a plugin
ed.onDeactivate.add(function(ed) {
    ed.save();  // or whatever you want to do to save the editor content
    ed.remove(); // removes tinymce instance
});
Thariama