We are creating a build process to minify and concatenate all our files.

Unfortunately, CKEditor loads config.js and styles.js by itself. I would like to concatenate all of these files together so that there's only 1 http request.

As a test, I tried to create a file that contains ckeditor.js and config.js combined together using the files from the basic download.

Unfortunately, it seems that ckeditor will still go ahead and try to load a config.js.

However, if I use the ckeditor.js hosted by ckeditor, there appears to only be 1 request: http://jsfiddle.net/jdPn3/

In the above case, config.js and styles.js does not appear to be loaded.

How are they doing the concatenation?

有帮助吗?

解决方案

For some reason, CKEDITOR.editorConfig() is not called once CKEditor is loaded. I think it is only called when instantiating an editor.

Therefore, I had to modify the global configuration directly:

CKEDITOR.config.customConfig = false; //no config.js
CKEDITOR.config.stylesSet = false; //no styles.js
CKEDITOR.config.defaultLanguage = 'en'; //default language
CKEDITOR.config.language = 'en'; //ui language
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top