开发者

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

开发者 https://www.devze.com 2022-12-17 02:24 出处:网络
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?

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

精彩评论

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