JavaScript to find TinyMCE rich text editor value is null or not
I use the TinyMCE textarea i开发者_运维知识库n one of my web applications.
- How to check the TinyMCE textarea's value is null or not using JavaScript?
document.getElementById("myeditorid").value
didn't help me.
It's not a textarea any more, so the value property won't work.
This is how you get a reference to the editor, and the text from it:
var text = tinyMCE.get('myeditorid').getContent();
var text = tinyMCE.get('createSurvey:thankyouMsg_ifr').getContent();
here the predefined id was "thankyouMsg"..After the tinyMCe,its id changed to this.I try to get the value in this way but it is not working saying tinyMCE.get('createSurvey:thankyouMsg_ifr')
is undefined
精彩评论