Reputation: 35264
I use the TinyMCE textarea in one of my web applications.
document.getElementById("myeditorid").value
didn't help me.
Upvotes: 7
Views: 14531
Reputation: 11
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
Upvotes: 1
Reputation: 700800
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();
Upvotes: 14