【发布时间】:2016-01-15 19:24:00
【问题描述】:
在 Laravel 项目中安装了 CKEditor 和 CKFinder,都在 Public/js 文件夹中
在我的主页中,我加载了一个特定于站点的 .js 文件,其中包含
var CKEDITOR_BASEPATH = '/js/ckeditor/';
也试过了:
var CKEDITOR_BASEPATH = 'http://localhost:8888/js/ckeditor/';
然后我加载我的 ckeditor.js 文件
从我的 /Resources/Views/admin/newpage.blade.php 视图中,我加载了一个文本框并调用 CKEditor.replace()。做得很完美。我可以添加一个新页面,甚至可以编辑它们。
当我尝试使用浏览服务器按钮时出现问题,它尝试从 /admin/ckeditor/plugins/... 而不是 /js/ckeditor/plugins/... 加载插件
我有一种感觉,我缺少一些简单的东西,但不确定是什么。有什么想法吗?
【问题讨论】:
-
您是否手动设置了
CKEDITOR.plugins的basePath属性?或者添加像CKEDITOR.plugins.addExternal('someNameForThePlugin', CKEDITOR_BASEPATH + '/js/ckeditor/', 'scriptFile.js')这样的外部资源,然后将其作为额外插件添加到编辑器配置中?检查这个:ckeditor.com/forums/CKEditor-3.x/…
标签: javascript php laravel-5 ckeditor ckfinder