現(xiàn)象:
var oEditor = FCKeditorAPI.GetInstance("fck1");
oEditor.SetHTML(值); //這時候,這位置報錯誤!
原因:編輯器控件還沒加載出來就賦值,這一定是錯誤的
解決方案:寫一個全局函數(shù) FCKeditor_OnComplete() 來操作
funtion FCKeditor_OnComplete(){//這個函數(shù)當編輯器自己加載完成之后會自己調(diào)用不用我們手動調(diào)用 這個和document.ready一樣
var oEditor = FCKeditorAPI.GetInstance("fck1");
oEditor.SetHTML(值);
}