Quote Originally Posted by RoPey View Post
Hi there
I have this in use on a clients site and I'd like to add some styles to the Styles dropdown so that they can stop adding in limitless html by pressing buttons repeatedly ;-)

I've had a look at the CKEditor website, specifically here http://docs.ckeditor.com/#!/guide/dev_styles and done lots and lots of Googling, but I'm still unsure how to achieve this. I believe I may need to change styles.js in the editors/ckeditor folder, but that doesn't seem to marry up to what I'm seeing in the current working Editor. There, there are styles such as Blue Title and Red Title, which I do not see defined in the styles.js.

I did add my own bit of code to that file in the form of
Code:
{ name: 'Red Text',     element: 'span' },
and an option Red Text did appear in the drop down, but of course the actual presence of it isn't going to turn any text red - somewhere I need to define the relative CSS rules. Please could someone point me in the right direction?

Thanks in advance...
Well I seem to have found the answer, I was in the right place but needed to have the following code:
Code:
{ name: 'Red Text',	        element: 'span', attributes: { 'class': 'redtext' } },
thus setting a class which can then be defined in my usual stylesheet. It's also possible to set the styles within that code. However, I'm still unsure how to get the styling to show in the editor itself, rather than just on the rendered site.

Any ideas would be welcome.

Thanks