Need to autosave TinyMCE

Posted by BFTrick on Stack Overflow See other posts from Stack Overflow or by BFTrick
Published on 2009-12-23T15:19:25Z Indexed on 2010/06/11 9:23 UTC
Read the original article Hit count: 298

Filed under:
|
|

Hello,

I am looking for some help autosaving tinyMCE. I want to save the content within tiny into its respective textarea after content has been updated. So that when I make an ajax call the content is in the textarea ready to be posted.

Currently I have this little bit of code but it only updates the text area when you press a button in tiny (like bold, italics, underline, etc). I also have the link where I found the code. Any help would be appreciated.

$('.AjaxEdit textarea.tiny').tinymce({

    //other init options

    //need this function to save tiny data before Ajax call
    //http://www.webmasterkitchen.com/article/tinymce-ajax-form-submission/
    setup : function(ed) {
    	ed.onChange.add(function(ed) {
    		tinyMCE.triggerSave();
    	});
    }
});

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about AJAX