When using an admin theme, the CKEditor module does not load custom versions of ckeditor.config.js or ckeditor.styles.js. For me, this manifests as a problem when editing blocks.
I have the CKEditor module configured with "Load ckeditor.config.js from theme path" set to "Yes" and a predefined path to ckeditor.styles.js to load custom styles for the styles combo.
This works fine when editing nodes, in both the display and admin themes, because I have elected not to edit content using the admin theme.
However, neither the custom toolbar specified in my theme version of ckeditor.config.js nor the custom styles specified in ckeditor.styles.js are loaded when I edit blocks, which are normally edited using the admin theme.
Comments
Comment #1
escoles commentedComment #2
escoles commentedSolution: Copy the config file to the root of the admin theme folder. You just have to remember to sync them if you have to update the config file.
Comment #3
mephir commentedIf you have any lack of clarity about issue, feel free to reopen it.
Comment #5
AlanAtLarge commentedHi
I've tried various combination of Predefined styles and Predefined styles path.
Also I have copied ckeditor.styles.js and ckeditor.config.js files back and forth between the module and my theme path, and nothing I do has any impact on getting a style appear in the style dropdown box. I either have the default or a BLANK empty box.
And I've used all combination of the the placeholders I can think of: %h, %t, and %m, as well as regularly clearing cache in both the browser and under site performance.
I am using garland as my admin theme, and working on my own themes. All I want to do is be able to apply a few simple classes to img tags and so far spent a half a day on this.
Any help appreciated.....really appreciated.
Thanks
Alan
Comment #6
sydneyshan commentedCan a preference item be added to the Edit CKEditor profile screen to specify whether the ckeditor.config.js file is loaded from the Admin theme OR the default theme? I use an Admin theme (Garland) for all content editing, and don't want to add files to the base Garland directory due to upgrade issues (I'll loose track of where I've put all these files), or they'll be overwritten in an upgrade.
A solution needs to be implemented where the location of the ckeditor.config.js file can be nominated somewhere OTHER THAN the currently active theme OR the module's directory. Does one exist already, or does this need to be added to the Edit CKEditor profile screen?
Comment #7
gionnibgud commentedHi you can add your custom ckeditor.config.js from any location.
I believe this could be quite a common issue when using the admin theme for content editing and the solution should be documented.
This is how I solved it.
Go to the Edit CKEditor profile screen and at the end of the page, in the custom javascript textarea, you can add this line:
customConfig = '/path-to-the-file/ckeditor.config.js';
Remember to clear your browser's cache before reloading the editing page.
Comment #8
borgo commentedIf you need to use relative path. 'path-to-the-file' mentioned above is relative to ckeditor library directory. In my case ckeditor library is in sites/all/libraries/ckeditor
So I had to go like
customConfig = '../../themes/mytheme/js/ckeditor.config.js';
In most cases I suppose your ckeditor library is under module directory in sites/all/modules/ckeditor/ckeditor, then its
customConfig = '../../../themes/mytheme/js/ckeditor.config.js';
Comment #9
dczepierga commentedI closed this issue, because it's not active over 3 months. Everything is written above.
Comment #10
nicholas.alipaz commentedThis took a good deal of work to figure out. This should really be documented better in the README and include information about using an admin theme.
Comment #11
1kenthomas commented//subscribing.
Comment #12
1kenthomas commentedDoes not seem to work as documented (above).
One really needs a system to confirm that the config file has been located and loaded, else this is a shoot in the dark.
Setting per-profile is fairly cumbersome, should only be an override-- need overall setting as in FCKeditor module.
Comment #13
1kenthomas commentedSee http://drupal.org/node/887896; currently does not seem to be working at all in 6.x-1.5 forward.
Comment #14
jwilson3As pointed out by the module maintainer (mkesicki) here #887896-18: Allow choice of ckeditor.config.js as per ckeditor.styles.js, the appropriate way to do this in Drupal 7 at least is with
config.customConfigin the "Custom javascript configuration" textarea on the CKEditor profile config page in the Drupal admin UI./sites/all/libraries/ckeditor./sites/all/libraries/ckeditor.Anyone using Drupal 6 version might try this solution as well.
Comment #15
nicholas.alipaz commentedjwilson3, this issue is 4 years old and for d6.
I guess your comment might help googlers, but doesn't help the conversation here much.
Comment #16
jwilson3I hope it helps a googler, reading through your suggested edits to the documentation (which, by now, it's clear will never be added to the D6 version), was difficult from how the wrapping works, so IMHO, my comment *does* help the conversation. Sorry to inconvenience you by bringing up the dead. ;)
Comment #17
jvdkolk commentedjwilson3: I am a Googler and very happy with your comment :)
Comment #18
psiegel commentedHello,
I am another happy Googler.
I use D7 and Ckeditor 1.7.7 and the issue of only looking at the root of the theme directory is still there. ckeditor.config.js is not found/ used when it is in a sub-directory of the theme (like theme/js).
I am using config.customConfig = '../../themes/bear_skin/js/ckeditor.config.js';
Any chance to get this solved or to have a variable %t with the current used them in order to replace bear_skin in the path?
Best,
Pascal
Comment #19
sammydigits commentedI wrote a quick blog post about how to use ckeditor.config.js to set default values in the image properties dialog:
http://blog.sam-thompson.info/drupal-and-ckeditor-setting-default-values...
Hope it helps someone.