spoilbirt's picture
Joined: 15/11/2012
Posts: 8
include custom css to the ckeditor
How do I include a custom css class in the ckeditor but not the inline style.
Any suggestions or solutions would be helpful.
jackherr's picture
Joined: 10/10/2012
Posts: 46
Re: include custom css to the ckeditor
I find your question confusing. What do you mean by "in the ckeditor but not the inline style"?

You can manage styling the body as follows:

You can set custom classes for styling the content by configuring the bodyClass and contentCss. The documentation says you may specify multiple css style sheets. I discovered that you can specify multiple body classes by embedding spaces in the class name strings. There may be a better way of doing the latter but we each bear the responsibility of checking the documentation and giving logical things a shot. That's how I came up with the space thing. So you can do something like

. . .
bodyClass : 'CKEditorInputArea CKEditorGeneratedContent RTEGeneratedContent',
contentsCss : [ 'HomePageTemplate.css','CKEditorCustomStyling.css' ],
. . .

You should also check out styling using the Styles features of the editor: