While attempting to implement a custom set of predefined styles I am having trouble getting the configuration settings to function as specified in the documentation. Specifically, when I place a copy of ckeditor.styles.js in the active theme folder and set the option "Predefined styles" to "Use theme ckeditor.styles.js" it does not load my custom file and instead uses the file in the module.
Alternatively, if I set the "Predefined styles" to "Define path to ckeditor.styles.js" and use the provided text field to define the path, the listed tokens do not appear to function correctly. "%t" appears to lead to "/hostname/modules/field/" instead of to my theme. Also, it is a little confusing that some of the tokens appear to include the trailing slash, but not all of them. It would be good to make this consistent.
FYI, I am using a Zen based sub-theme and D7.0
Thanks,
Jason
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | fix_themepath-1039810-6.patch | 421 bytes | anrikun |
Comments
Comment #1
ccarigna commentedThe $themepath variable is using Drupal's path_to_theme() function, but that is returning the wrong value ("module/field"), and it can be unpredictable depending on where you call it from (see the first comment on http://api.drupal.org/api/drupal/includes--theme.inc/function/path_to_theme).
On line 479 in ckeditor.lib.inc, changing
$themepath = path_to_theme() . '/';to
$themepath = drupal_get_path('theme', $theme) . '/';will point to the proper path and load the custom ckeditor.styles.js file.
Comment #2
mkesicki commentedThx @cwc for your solution. We will check this ASAP and fix this.
Comment #3
dczepierga commented@cwc really thx for patch, i commit it to GIT.
Please check the latest dev release and let me know if you notice any poblems with it. Remember to clear Drupal cache and browsers cache before testing.
Greetings
Comment #6
anrikun commentedThis should be backported to D6.