CKEditor在Laravel中忽略了BASEPATH [英] CKEditor ignoring BASEPATH in Laravel

查看:110
本文介绍了CKEditor在Laravel中忽略了BASEPATH的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Laravel项目中安装CKEditor和CKFinder,两者都在Public / js文件夹中

Installed CKEditor and CKFinder in a Laravel project, both in the Public/js folder

在我的主页面中,我加载了一个特定于站点的.js文件,其中包含

In my main page, I load a site specific .js file which contains

var CKEDITOR_BASEPATH = '/js/ckeditor/';

还试过:

var CKEDITOR_BASEPATH = 'http://localhost:8888/js/ckeditor/';

然后我加载我的ckeditor.js文件

Then I load my ckeditor.js file

从我的/Resources/Views/admin/newpage.blade.php视图中,我加载一个文本框并调用CKEditor.replace()。它完美吗?我可以添加一个新页面,甚至可以编辑它们。

From my /Resources/Views/admin/newpage.blade.php view, I load up a text box and call CKEditor.replace(). Does it perfectly. I can add a new page, even edit them.

当我尝试使用Browse服务器按钮时出现问题,它尝试从/ admin / ckeditor /加载插件插件/ ...而不是/ js / ckeditor / plugins /...

Problem occurs when I try to use the Browse server buttons, it tries to load the plugin from /admin/ckeditor/plugins/... instead of /js/ckeditor/plugins/...

我感觉它很简单我想念,但不知道是什么。有什么想法吗?

I have a feeling its something simple I am missing, but just not sure what. Any thoughts?

推荐答案

你必须写一个完整的地址到这个文件

you have to write full address to file file this

<script>
  window.CKEDITOR_BASEPATH = 'http://example.com/path/to/libs/ckeditor/';
</script>

这篇关于CKEditor在Laravel中忽略了BASEPATH的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆