Because I will forget unless I save a copy here.
This is a very basic function for adding a string to tinymce (I use it to add images that are listed elsewhere on a page).
// Adding content to the end of the tinymce editor function addToTiny(newContent){ var inst = tinyMCE; inst.execCommand('mceFocus',false,'content'); inst.execCommand('mceInsertContent', true, newContent); }
Display clean javascript code for copying
// Adding content to the end of the tinymce editor
function addToTiny(newContent){
var inst = tinyMCE;
inst.execCommand('mceFocus',false,'content');
inst.execCommand('mceInsertContent', true, newContent);
}