- var checkContent =FCKeditorAPI.GetInstance("editor");//获取实例
- alert(checkContent.GetXHTML());//获取当前内容
- var newelement = document.createElement("a");
- newelement.href="#";
- newelement.innerHTML="df";
- checkContent.InsertElement(newelement);//前部添加元素(无返回值)
- var a=checkContent.InsertElementAndGetIt(newelement);//前部添加元素(返回元素) checkContent.InsertHtml(" ")//添加html
- checkContent.SetHTML(" ",true);//设置内容,后为bool,是否所见即所得
- function aaa()
- {
- var checkContent =FCKeditorAPI.GetInstance("editor");//获取实例
- checkContent.SwitchEditMode();//转变编辑模式
- checkContent.UpdateLinkedField();//更新关联文件
- }
- function FCKeditor_OnComplete( checkContent )//当加载完
- {
- alert( checkContent.Name ) ;
- }
oEditor这个是全局变量,指当前实例,可以用到弹出页中如fck_p_w_picpath.html
创建实例,oEditor.FCKeditorAPI.GetInstance("editor") 也可以用oEditor.FCK,后者更灵活. 返回顶级页 oEditor.parent.parent
来自:网络
转载于:https://blog.51cto.com/huqianhao/954971