get value of tinyeditor using jquery not working

615 views Asked by At

i would like to get the value of tinyeditor textarea using jquery for this i have written:

 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'}
});

for getting value using 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

and also some other way..

any help or suggestion would be a great help.. thanks in advance

1

There are 1 answers

0
Mohammed Sufian On BEST ANSWER

well i found the solution.. so i would like to share it with everyone..

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

and then:

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