tinymce - get tinyEditor value in javascript - Stack Overflow

i am using tinyEditor as my text editor, but i donno how to get a tinyEditor textarea's value in j

i am using tinyEditor as my text editor, but i donno how to get a tinyEditor textarea's value in javascript. when i user document.getElementById('texteditor').value; it gives me null. nothing. anyone know how to fix this problem?

this is the site for tinyEditor

i am using tinyEditor as my text editor, but i donno how to get a tinyEditor textarea's value in javascript. when i user document.getElementById('texteditor').value; it gives me null. nothing. anyone know how to fix this problem?

this is the site for tinyEditor

Share Improve this question edited Sep 7, 2013 at 12:50 Pars asked Aug 17, 2011 at 20:22 ParsPars 5,27211 gold badges59 silver badges91 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 5

Try this (editor is the instance):

editor.post();
var textAreaHtml = editor.t.value;

Well, the standard way is:

tinyMCE.get('element-ID').getContent();

which element-ID is the id of the textarea used for tinyMCE.

editor.i.contentWindow.document.body.innerHTML

this will return value of editor, but this is hack, this is not valid access, as I can see method for getting content doesn't exists.

so "editor" is name of your editor.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745392212a4625713.html

相关推荐

  • tinymce - get tinyEditor value in javascript - Stack Overflow

    i am using tinyEditor as my text editor, but i donno how to get a tinyEditor textarea's value in j

    10小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信