Note the upgraded forum! If you are experiencing issues logging in, you may need to reset your password which should send an email. If the email doesn't arrive, be sure to check your spam folder just in case.

CKEditor Styles in dropdown

edited December 2011 in Modules
How do you set styles for the dropdown in CKEditor as seen here

Can you do this from the MY_fuel.php config, or do you have to hack the page layout and run the CKEDITOR.stylesSet.add manually?


  • edited 4:52AM
    Setting it in MY_fuel I don't think will work. You could create a js file and put your logic in there and then include it using a module's "js" configuration property. If it is an existing module, like "pages" you can use $config['module_overwrites']['pages']['js'] = array('my_js.js'); in your MY_fuel_modules.php file.

    Alternatively, you could try adding that style info to the fuel/modules/fuel/assets/js/editors/ckeditor/config.js file.
  • edited 4:52AM
    I'm now loading a custom JS file for Fuel. Tried putting this in it

    CKEDITOR.stylesSet.add( 'my_style',
    // Block-level styles
    { name : 'Paragraph' , element : 'p' },
    { name : 'Heading 1 awe' , element : 'h1' }

    No luck. Also tried adding


    to $config['ck_editor_settings']

    No luck there either. Looking at CKEDITOR in the console shows that the style set is added, but it seems like it's ignoring anything I add in the dropdown.

    Maybe this is a question for the CKEditor guys though.
  • edited 4:52AM
    Any luck adding it to the ckeditor/config.js file?
  • edited 4:52AM
    Tried putting the config in there and naming it "default", no luck; although, the browser is loading that file. Also tried the ckeditor/plugis/styles/styles/default.js Again, loads it, but no change.

    Interesting though, it is sourcing my 'contentsCss' from the MY_fuel.php config, so the styles are right, I just can't change which tags it's displaying in the dropdown so I get the default "Heading 1, Heading 2 ..."
Sign In or Register to comment.