Monday, December 13, 2010

TinyMCE clearing changes on form submit

Programmer Question

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?



Find the answer here

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails