【发布时间】:2014-03-11 10:55:17
【问题描述】:
我想使用 jquery 获取 tinyeditor textarea 的值,为此我已经写过:
var description = new TINY.editor.edit('description', {
id: 'description',
width: 330,
height: 175,
cssclass: 'tinyeditor',
controlclass: 'tinyeditor-control',
rowclass: 'tinyeditor-header',
dividerclass: 'tinyeditor-divider',
controls: ['bold', 'italic', 'underline', 'strikethrough', '|',
'orderedlist', 'unorderedlist', '|', 'undo', 'redo'],
footer: true,
fonts: ['Verdana', 'Arial', 'Georgia', 'Trebuchet MS'],
footerclass: 'tinyeditor-footer',
resize: {cssclass: 'resize'}
});
使用 jquery 获取价值:
$('#p_description').html($('#description').val()); // does not work
$('#p_description').html(description.post()); // does not work
$('#p_description').html(TINY.editor.description.value); // does not work
还有其他方式..
任何帮助或建议都会有很大帮助.. 在此先感谢
【问题讨论】:
标签: javascript jquery textarea tinyeditor