Posted by debonator on March 16, 2012 at 9:35am
7 followers
| Project: | CKEditor - WYSIWYG HTML editor |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
here's what i've done so far:
1. copied ckeditor.styles.js to my theme folder
2. set the predefined styles path in admin >> settings >> ckeditor >> profile to call the file from my theme
3. edited this file to include my custom styles
4. cleared cache about 20 times
nothing. the custom styles don't show up. in fact, i can't even tell where the custom styles that DO show up are coming from since they don't seem to correspond to any other file i can find.
this is annoying and appears to be a common problem. this was so much easier under fckeditor when you just edited an xml file. can someone - anyone - help me figure this out?
thanks!
debra
Comments
#1
#2
Same problem here. Even tried to modify the module's ckeditor.styles.js and nothing happened.
Help!
#3
There are multiple issues for this problem. Here is the only solution I've found to work out of all those proposed.
http://drupal.org/node/1287432#comment-5515696
#4
I believe the problem comes down to browser caching. I'm going to re-classify this as a bug.
For JS files included via
drupal_add_js(), a dummy query string is appended to files to trick browsers into loading a new copy of the file (seedrupal_get_js()). This query string is refreshed whenever you clear all caches.However, the way in which ckeditor.styles.js is included doesn't receive this query string treatment, so clearing the Drupal cache will have no effect on what's happening client-side.
The module actually does apply the query string trick for a number of included files, but ckeditor.styles.js seems to have been overlooked. I've attached a patch that extends this to that file so that when you clear your Drupal cache, you should see the changes reflected in the style dropdown.
This may also what is the cause for #1543970: Changes to ckeditor.styles.js not reflected in 'Styles' drop-down list, which is targeted at the 7.x branch, but I'm not on Drupal 7, so I can't test to confirm.