FCKEditorAPI未定义

weimin252642435 2009-12-10 03:31:23
//FUCKING,单独为FCK写一个js函数,插入FCK的内容
setFCKContent : function (newsId){
alert("newsId:"+newsId);
//var newsId = document.getElementById("newsId").value;
//alert("newsId:"+newsId);
admnewlist.findByNewsId(newsId,{
callback:function(object){
//alert("object:"+object);
admin.getFCKContent(object);
}
})
},
getFCKContent : function (object){
alert(object.newsContent);//可以打印出内容
var oEditor = FCKeditorAPI.GetInstance("content"); //执行到这就报FCKeditorAPI未定义
oEditor.InsertHtml(object.newsContent) ;
document.location.href = basePath+"admin//news//newsEdit.jsp?newsId="+object.newsId;
}
请问哪位高手碰到过这样的问题,FCKeditorAPI未定义,web.xml里面都配置了,包也都导入了,代码可以肯定没问题,我alert里面的都能弹出内容,但是执行到FCKeditorAPI.GetInstance("content"); 就报FCKeditorAPI未定义
...全文
775 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
ebonyzhang 2011-07-19
  • 打赏
  • 举报
回复
editor/js/fckeditorcode_ie.js导入这个js
里面有api的定义!
bobo415 2009-12-14
  • 打赏
  • 举报
回复
up
sun_abc 2009-12-14
  • 打赏
  • 举报
回复
导入 :/fckeditor/fckeditor.js
设置基本路径:oFCKeditor.BasePath = "../fckeditor/"
我用的 var oEditor = FCKeditorAPI.GetInstance("msgBody");
var str=oEditor.GetXHTML(true);
没问题啊
weimin252642435 2009-12-14
  • 打赏
  • 举报
回复
谁顶分就给谁
weimin252642435 2009-12-10
  • 打赏
  • 举报
回复
我看了FCK里面的例子代码 都是这样写的啊 , 为什么我这里就报FCKeditorAPI未定义呢

81,092

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧