3

I am trying to include custom css file to ckeditor.

It doesn't show css file in styles drop-down list.

I have included this two lines of code into;

 /drupal/sites/all/modules/ckeditor/ckeditor.config.js

 config.extraPlugins = 'stylesheetparser';
 config.contentsCss = 'test.css';

Thanks a lot for the help.

4
  • Did you get anywhere with this? Commented Apr 26, 2013 at 10:13
  • Are you getting the dropdown or missing the styles dropdown completely? I'm not talking about the one with the htags and stuff but the actuall styles Commented Jan 7, 2014 at 21:48
  • 1
    CKEditor loads in an iFrame, and browsers usually tend to cache that aggressively or show a cached version inside the iFrame until you actually visit the page in a new browser tab. Inspect the CKEditor iFrame and copy the href of the iFrame and paste it into a new tab, then do a hard refresh / CTRL+F5 or just empty your browser cache.
    – Beebee
    Commented Aug 7, 2014 at 10:35
  • Have you enabled the styles in Ckeditor as described in this question?
    – tanbog
    Commented Sep 9, 2017 at 20:22

1 Answer 1

0

Have tried going adding the css file via the configuration page?

yoursite.com/admin/config/content/ckeditor/edit/

navigate to the page, edit the target profile and click on the CSS link to expand the configuration pane... you should be able to tell CKeditor what to do from there. I'm not sure if its necessary but you may need to refresh the site's cache before the new files get picked up. hope this helps.

1
  • 1
    I tried the same but couldn't find any thing in ckeditor.Thanks for reply.
    – kumar
    Commented Jun 18, 2012 at 17:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.