markstory / asset_compress

An asset compression plugin for CakePHP. Provides file concatenation and a flexible filter system for preprocessing and minification.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AssetCompress does not work with CKEditor

lupuswwww opened this issue · comments

A segment of asset_compress.ini:
....
[cms-java-scripts.js]
files[] = jquery.js
files[] = ckeditor/ckeditor.js
files[] = all.js
......
It does not work for ckeditor.

What's not working?

files[] = ckeditor/ckeditor.js
ckeditor is not showing
look last post (same problem) http://mark-story.com/posts/view/asset-compress-plugin-released

@lupuswwww Ok, but what is the error? Are you getting an error in javascript or from the process that is building assets? That comment gives me no new information beyond what is in this issue.

When I throw a script from ini file like this:

<script src="/js/admin/ckeditor/ckeditor.js"></script>

everything is working properly.
It is a js error: TypeError: [c]a is undefined (from firefox error console)

Had the same issue and found this page when Googling.
The problem is that CKEditor is loaded from a different location when loaded with AssetCompress and can't find its configuration.
I solved it by including a JS setup file (before the ckeditor.js) in the same build with the following content:
window.CKEDITOR_BASEPATH = '/[path to the original CKEditor files]/';