【发布时间】:2016-07-04 01:29:25
【问题描述】:
我正在尝试在我的项目中安装 CKEditor。我正在使用 Laravel。
我知道我可以下载这些文件,但我喜欢让我的生活变得困难,所以我决定安装 CKEditor 作为 npm 依赖项。
正如他们的文档 here 中所述,我将包添加到 package.json,如下所示:
"dependencies": {
"jquery": "^1.11.1",
"bootstrap-sass": "^3.0.0",
"elixir-coffeeify": "^1.0.3",
"laravel-elixir": "^4.0.0",
"font-awesome": "^4.5.0",
"ckeditor": "^4.5.7"
}
现在我想我必须在我的 app.coffee 中要求它,所以我尝试了:
window.$ = window.jQuery = require('jquery')
require('bootstrap-sass')
require('ckeditor')
这肯定会将 ckeditor.js 脚本添加到我的 app.js 中。但是 ckeditor 似乎有自己的依赖项,例如 config.js 或 editor.css,当然服务器会为这些请求响应 404。
我怎样才能以这种方式安装 CKeditor?
谢谢!
【问题讨论】:
标签: node.js laravel ckeditor gulp laravel-elixir