Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
I'm trying to get custom CSS styles to show up in ckeditor, but it's not working.

Here's the opening tag of my editable region code (I tried it without the opening slash before the "js" too):
Code: Select all
<cms:editable name='about_text' label='About Text' css='/style.css' toolbar='basic' custom_styles="my_styles=/js/ckeditor_styles.js" type='richtext'>


And my ckeditor_styles.js code is:
Code: Select all
CKEDITOR.stylesSet.add( 'my_styles',
[
   { name : 'Bold Text'      , element : 'h3' }
]);


I've tried clearing my cache, but it doesn't seem to help. Any ideas? Thanks!
Hi and welcome to our forums Megan :)

Apropos the problem you mentioned -
Please set toolbar='full'.
You'll find that there are two dropdowns, 'Styles' and 'Format', in the toolbar.
It is the 'Styles' dropdown, and not the 'Format', that shows the custom styles. The 'styles' dropdown is not visible at all in the 'basic' toolbar that you are using and this is what must be confusing you.

To add the 'styles' dropdown to the 'basic' toolbar, we'll have to use a 'custom' toolbar to mimic the 'basic' one and add the 'styles' button to it. Please see 'custom_toolbar' section in http://www.couchcms.com/docs/tags-refer ... htext.html for details.

Hope this helps.
Do let us know.

Thanks.
Oh my goodness, yes. Thank you for pointing out my obvious mistake!
3 posts Page 1 of 1
cron