admin管理员组文章数量:1426014
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 badges3 Answers
Reset to default 5Try 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.
本文标签: tinymceget tinyEditor value in javascriptStack Overflow
版权声明:本文标题:tinymce - get tinyEditor value in javascript - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745392212a2656649.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论