Hi All
It\'s the first time I\'ve used Tiny Mce and I have a problem. Please Help
The editor works fine in editing but when I click submit nothing is sent from t
It is necessary to update the textareas content with the content of the editors iframe (tinymce uses an editable iframe like most rtes). In order to achieve this you need to call tinymce.get('elm1').save();
before you submit.
You can also grab the editors content using tinymce.get('elm1').getContent();
and sent this.t
Why TinyMCE is not sending updated value?
Tinymce will not update the html/content of hidden textarea input field when you are using ajax to submit a form. You need to update the content/html of textarea input field manually before submit a form using tinyMCE.triggerSave()
. Note: textarea will be hidden when you will use it as Tinymce.
How TinyMCE will send updated value?
Now we will push the content/html of TinyMCE to textarea.
$("form").submit(function (event) {
event.preventDefault();
tinyMCE.triggerSave(); //this line of code will use to update textarea content
//your ajax function/code
});
function SubmitForm() {
tinyMCE.triggerSave();
$('#submit-form-training-materials').submit();
}