CKEDITOR.replace ("html_content_editor", {
toolbar: "cmspage",
contentsCSS: "http://site.com/folder/page_content.css",
height: 600,
width: 600,
filebrowserImageBrowseUrl: "filemanager/browse"
});
Thu, 08/12/2010 - 08:52
#1

Re: Can't attach custom CSS stylesheet
I had to add this to the contents.css file in the CKEditor folder:
@import url('path/to/css/file.css');Remember that this needs to go right at the top of the file, and be the first declaration, no matter what.
This only works in my case becusae I've got a script that detects which CSS file I should be using and returns that one - there's still no way to do anything dynaically, or even by editor instance, which means that there's pretyt much no flexibility in this for what i needed to do.
Hipefully this will work for me for a while, and might be able to help someone else out.