CkEditor无法设置未定义的属性'dir'
我想用CKEditor。
我目前使用npm安装CKEditor
所以它被安装在node_modules文件夹中
我的文件夹结构就像
应用程序 – > index.js
node_modules – > ckeditor – > …
我已经在index.js中需要它了
库的初始化之前也设置variables
var CKEDITOR_BASEPATH = '../node_modules/ckeditor'
仍然得到dir错误
build议一些帮助
尝试改变
var CKEDITOR_BASEPATH = '../node_modules/ckeditor';
至
window.CKEDITOR_BASEPATH = '../node_modules/ckeditor/';
不要忘记目录上的尾部斜线
并尝试把窗口声明上面导入ckeditor
查看此链接以获取更多信息: http : //docs.cksource.com/CKEditor_3.x/Developers_Guide/Specifying_the_Editor_Path
NoToBagels修复了我的一个问题。 我也有jQuery文档准备好的variables正在注册CKEDITOR_BASEPATH为时已晚。 只要加载的JavaScript文件解决了问题,将其移动就可以运行。