I’m using TinyMCE and it’s jQuery plugin.
I added a function to be called each time the save button is clicked, like this:
$('#my:textarea').tinymce({
save_callback: function() { console.log('saving things!'); }
});
It’s called 4 times each time the user clicks the save button; should I be putting my callback somewhere else?
According to the documentation,
save_callbackis considered deprecated. It suggests you to use the new Event API.Give this a try:
Example grabbed from here: http://tinymce.moxiecode.com/wiki.php/API3:event.tinymce.Editor.onSaveContent