JavaScript to find the value of the TinyMCE rich text editor is null or not.

I am using the TinyMCE text area in one of my web applications.

  • How to check textarea TinyMCE null value or not use JavaScript?

document.getElementById("myeditorid").value did not help me.

+7
javascript validation tinymce textarea
source share
2 answers

This is no longer a text area, so the value property will not work.

Here's how you get a link to the editor and text from it:

 var text = tinyMCE.get('myeditorid').getContent(); 
+14
source share
 var text = tinyMCE.get('createSurvey:thankyouMsg_ifr').getContent(); 

here the predefined identifier was "thankyouMsg". After tinyMCe, its identifier has changed to this. I try to get the value this way, but it doesnโ€™t work, saying tinyMCE.get('createSurvey:thankyouMsg_ifr') is undefined

+1
source share

All Articles