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.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745392212a4625713.html
评论列表(0条)