问题描述:

Why can't I get the content in a tinymce textarea through Javascript/Jquery? With all the things I've tried, it has always given me [object HTMLTextAreaElement] As a response. What am I doing wrong?

Javascript:

function changeText2(){

var content = tinyMCE.getContent('content');

}

alert(content);

HTML:

<textarea id="content" onkeyup='changeText2()' name="page" cols="50" rows="15">

tinymce editable content in here

</textarea>

网友答案:

You are getting the textarea element itself. To get its value, add .value.

相关阅读:
Top