0

我想使用 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

还有其他方式..

任何帮助或建议都会有很大帮助..提前谢谢

4

1 回答 1

1

好吧,我找到了解决方案..所以我想与大家分享..

description.post();
var p_description = description.t.value;

接着:

 $('#p_description').html(p_description);
于 2014-02-12T21:26:58.053 回答