I can't get working custom config passed in Advanced Options -> Custom javascript configuration.
Even tip from http://drupal.org/node/1183254#comment-4578836 doesn't work.

config.bodyId = 'contents_id'; - breaks editor
bodyId = 'contents_id'; - does nothing

Is it me or CKE?

Comments

mkesicki’s picture

Hi,
here you have all config options for CKEditor described http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html. For what do you try use config.bodyId option? Remember to use config. prefix for each option and that some of them are set by others settings like "HTML Entities".

altavis’s picture

Hello,
can you please test any custom config? Let's take config.colorButton_colors = '00923E,F8C100,28166F'; as example. This causes my ckeditor is not showing.

I'm trying to set config.bodyId to set the id attribute of the editors body element. I'm on latest 7-dev.

mkesicki’s picture

Yes, there is javascript error:

missing exponent
00923E,F8C100,28166F
ckeditor.utils.js (row 110) file

This looks like problem with eval function in this case. Thanks @altavis for notice this.

dczepierga’s picture

Title: Custom javascript configuration howto » Bug in custom javascript configuration - editor not showing on some cases
Component: User interface » Code
Category: support » bug
Status: Active » Needs review

It's my fault, when i rewrite old engine of custom javascript configuration i paste old pattern and it's strip too much special characters (apostrophe/quotation-marks from the begining and end of string) for eval function in new engine.

I fix it and commit to GIT, so pls download last DEV version and try to test it with some configuration options like arrays, multi-arrays, etc...

Greetings

mkesicki’s picture

I checked this with these settings

config.templates_files = ['/drupal7/sites/all/modules/ckeditor/ckeditor/plugins/templates/templates/default.js', '/drupal7/sites/all/modules/ckeditor/ckeditor/plugins/templates/templates/default_1.js', '/drupal7/sites/all/modules/ckeditor/ckeditor/plugins/templates/templates/default_2.js'];
config.colorButton_colors = '00923E,F8C100,28166F, 000000';

and it works on latest DEV version.

dczepierga’s picture

Status: Needs review » Fixed

Ok, so i mark this issue as fixed.

Greetings

BBC’s picture

I'm experiencing the same problem with the 6.x versions (both 1.5 and dev).

Was the fix also applied there?

I'm running a number of sites using a shared admin theme and custom ckeditor toolbar configs, all of which are now using to the toolbar defaults from the module rather than the custom settings I had defined. I can't seem to find a solution to the problem that does not involve either ditching the admin theme for page editing or adding a custom toolbar name for each site in the module's ckeditor.config.js.

Any suggestions would be appreciated.

Thanks,

-Ben

dczepierga’s picture

Title: Bug in custom javascript configuration - editor not showing on some cases » [D7] Bug in custom javascript configuration - editor not showing on some cases

@BBC, i move this to new issue, fix it and commit to GIT: #1204786: [D6] Bug in custom JavaScript configuration - editor not showing in some cases
So pls update to last DEV version and everything should works fine.

Greetings

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

mkesicki’s picture

Title: [D7] Bug in custom javascript configuration - editor not showing on some cases » [D7] Bug in custom JavaScript configuration - editor not showing in some cases