How to get the content of a Tinymce textarea with JavaScript

后端 未结 10 2093
忘掉有多难
忘掉有多难 2020-12-02 20:08

i have an array of content then how we get content of Tinymce textarea in javascript

10条回答
  •  既然无缘
    2020-12-02 20:48

    I solved it with code:

    // Get the HTML contents of the currently active editor
    tinyMCE.activeEditor.getContent();
    
    // Get the raw contents of the currently active editor
    tinyMCE.activeEditor.getContent({format : 'raw'});
    
    // Get content of a specific editor:
    tinyMCE.get('content id').getContent()
    

    the activeEditor is current editor,but i use tinyMCE.get('editor1').getContent() can not get the value of my editor, hope it can help you

    Tinymce API: http://www.tinymce.com/wiki.php/API3:method.tinymce.Editor.getContent

提交回复
热议问题