How to replace the content of tinyMCE editor in both text and visual mode using jQuery?
The first thing to do is to select the active editor. Here we select the editor using its id, which is content. var activeEditor = tinyMCE.get(‘content’); Then we use tinyMCE’s setContent: var activeEditor = tinyMCE.get(‘content’); var content=”HTML or plain text content here…”; activeEditor.setContent(content); However, if the editor is in text mode to begin with, after … Read more