Get tinyMCE value in ajax form post

For ajax form post you might have problem regarding getting the tinyMCE value in form post. To resolve this problem you need to get the value of timyMCE before the form submit and send it to ajax post medhod and get it from there. Like I have an event message with tinyMCE and I was submitting it with ajax and was not getting the value of it. So I came up with the following solutions.

Firts I took the value of event mesassage

var event_message = tinyMCE.getInstanceById('event_message').getBody().innerHTML

then send it to the ajax data:

data:$('#frmaddevent').serialize()+'&event_message='+event_message,

by this way I get value of tinyMCE

One thought on “Get tinyMCE value in ajax form post

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>