views:

35

answers:

0

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?