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(\'
With version 4 you should do it like this:
tinymce.init({selector:'textarea'});
tinymce.activeEditor.setContent('custom');
Here's a fiddle.
I've used the init_instance_callback, which is fired when the editor is ready to setContent.
var options = { ... };
options.init_instance_callback = function (editor) {
editor.setContent(initialContent);
};
$("some-selector").tinymce(options);