2012-03-30 17 views

Respuesta

17
function insertYourContent(){ 
    tinyMCE.activeEditor.execCommand('mceInsertContent', false, "Whatever text"); 
} 

var myIcon = document.getElementById("sInput_netadvimage"); 
if(myIcon.attachEvent) 
    myIcon.attachEvent("onclick", insertYourContent); 
else if(myIcon.addEventListener) 
    myIcon.addEventListener("click", insertYourContent, false); 
2
function insertYourContent(text){ 
     tinyMCE.execInstanceCommand("elm1","mceInsertContent",false,text); 
} 
Cuestiones relacionadas