【问题标题】:get value of tinyeditor using jquery not working使用 jquery 获取 tinyeditor 的值不起作用
【发布时间】: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


    【解决方案1】:

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

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

    然后:

     $('#p_description').html(p_description);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2015-02-12
      • 1970-01-01
      • 1970-01-01
      • 2013-06-24
      • 1970-01-01
      • 1970-01-01
      • 2014-12-29
      • 2018-01-23
      相关资源
      最近更新 更多