【www.gdgbn.com--php常用代码】
向编辑器插入指定 并设置编辑器中内容
<script>
//向编辑器插入指定代码
function inserthtmltoeditor(codestr){
var oeditor = fckeditorapi.getinstance("content");
if (oeditor.editmode==fck_editmode_wysiwyg){
oeditor.inserthtml(codestr);
}else{
return false;
}
}//设置编辑器中内容
function setcontents(codestr){
var oeditor = fckeditorapi.getinstance("content") ;
oeditor.sethtml(codestr) ;
}
</script>