TinyMCE clearing changes on form submit

Posted by DCD on Stack Overflow See other posts from Stack Overflow or by DCD
Published on 2010-03-31T10:18:47Z Indexed on 2010/03/31 10:23 UTC
Read the original article Hit count: 335

Filed under:
|
|

I've added a toggle button to TinyMCE (using the jQuery plugin version) that looks like:

        $('a.mce_show').click(function(){
            // toggle all textareas
            $('.wysiwyg').tinymce().show();
        });

        $('a.mce_hide').click(function(){
            // toggle all textareas
            $('.wysiwyg').tinymce().hide();
        });

The problem is if you hide the editor, make a change and click 'submit' it'll discard the change. If you hide the editor, make a change, show the editor then click submit it'll be fine.

How do I get it to submit properly without having to re-show the editor?

© Stack Overflow or respective owner

Related posts about tinymce

Related posts about jQuery