initialize tinymce with content

后端 未结 2 1012
春和景丽
春和景丽 2020-12-20 16:10

I have a page containing one tinymce4 editor instance. I want to initialize this editor with some content, programmatically. I know that I have to call: tinymce.get(\'

2条回答
  •  既然无缘
    2020-12-20 16:42

    With version 4 you should do it like this:

    tinymce.init({selector:'textarea'});
    tinymce.activeEditor.setContent('custom');
    

    Here's a fiddle.

提交回复
热议问题