When I have tiny MCE as the default editor I was able to add html to the editor using this javascript command

var content = tinyMCE.get(editor).getContent();
content = tinyMCE.get(editor).setContent("");
jInsertEditorText(html, editor);

What do I need to do to target both editors or all editors please?


  • Do you need to do this in JS without access to PHP? Commented Oct 24, 2016 at 10:10

1 Answer 1


According to my experience tinymce variable. has the access to any editor, and you can access the content with tinymce.activeEditor.getContent().

NOTE: There is only one special case with Zoo, where the previous sentence returns empty, and you have to call tinymce.editors[0].getContent() instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.