This option is considered deprecated. Use the new Event API
This option enables you to add custom logic to be executed when the contents are extracted/saved. This custom logic can then modify the contents before it's submitted to a serverside page. This can be useful if you want to do your own regexp cleanups and so forth. The format of this function is: saveContent(element_id, html, body)
. Where element_id
is the form element/div id of the editor and HTML is the HTML contents after the built-in cleanup process has executed. This function should return the new HTML contents.
Example of usage of the save_callback option:
function myCustomSaveContent(element_id, html, body) {
// Do some custom HTML cleanup
html = html.replace(/a/g,'b');
return html;
}
tinyMCE.init({
save_callback : "myCustomSaveContent"
});
Was this article helpful? Yes - No
Well, that's awkward . Would you mind opening an issue or helping us out?
Thanks for the feedback!
Except as otherwise noted, the content of this page is licensed under the Creative Commons BY-NC-SA 3.0 License, and code samples are licensed under the Apache 2.0 License.