Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CKEditor ignoring BASEPATH in Laravel

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

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

var CKEDITOR_BASEPATH = '/js/ckeditor/';

Also tried:

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

Then I load my ckeditor.js file

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.

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?

like image 500
Keith Clark Avatar asked Oct 16 '15 22:10

Keith Clark


2 Answers

you have to write full address to file file this

<script>
  window.CKEDITOR_BASEPATH = 'http://example.com/path/to/libs/ckeditor/';
</script>
like image 130
Pedram marandi Avatar answered Oct 25 '22 03:10

Pedram marandi


use Symfony-2 laravel5 composer

like image 37
Gowthaman D Avatar answered Oct 25 '22 02:10

Gowthaman D