Get value from tinymce textarea in jQuery

Getting the value of a textarea in jQuery is as easy as using the 'val' function on your selector. If the textarea is controlled by tinyMCE however you may find that the value returned doesn't appear to be up-to-date or reflect what you can visibly see. 

To resolve this you can call tinyMCE's 'triggerSave' function that will ensure the value of the textarea reflects the currently edited content of the WYSIWYG editor like so:

tinyMCE.triggerSave();
$('#textarea-selector-id').val();

Sign Up
comments powered by Disqus
Sign Up

Popular Tags

350x250

Need a web developer?

If you'd like to work with code synthesis on your next project get in touch via the contact page.