开发者

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

I use the TinyMCE textarea i开发者_运维知识库n one of my web applications.

  1. 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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜