TinyMCE with JQueryForm

Before submitting the form, call tinyMCE.triggerSave();

<script>
// jQuery From
$(document).ready(function() {
$(‘#page_edit_form’).submit(function() {

           tinyMCE.triggerSave();

$(this).ajaxSubmit({
success: function(res, statusText, xhr, $form) {
alert( res);
}
});
// return false to prevent normal browser submit and page navigation
return false;
});

});

</script>

source:  http://stackoverflow.com/questions/2122085/problem-jquery-and-tinymce-textarea-value-doesnt-submit

 

 

 

B logbook : PHP | Javascript | Laravel | CodeIgniter | VueJs | ReactJs | WordPress

Translate »