Use styles from skin css file

Jun 8, 2011 at 12:36 AM

I want to populate the Styles dropdown with styles from my skin.css file.

I've included the stylesheetparser plugin using

config.extraPlugins = 'MediaEmbed,syntaxhighlight,tableresize,stylesheetparser';

but am having trouble with contentsCSS trying to find the css file:

config.contentsCss = '/Portals/_default/portal.css'

doesn't seem to find the file.  Any ideas?

 

Coordinator
Jun 10, 2011 at 11:41 AM

nice Plugin, didnt know about it, will be added by default in my next release. If you want to include a css please use the editor Options instead. There is an Option for that "Editor area CSS" to include css.

But the standard portal.css wont be parsed by the plugin it only parses css values like...

div.Quote {font-family: Helvetica, Arial, San-Serif;font-size: 10px;border: black 1px dotted;background: #F1F1F1;padding: 5px 10px;margin-bottom: 5px;}

and not

.Quote {font-family: Helvetica, Arial, San-Serif;font-size: 10px;border: black 1px dotted;background: #F1F1F1;padding: 5px 10px;margin-bottom: 5px;}

only values with a html tag will be parsed.

 

Jun 13, 2011 at 10:14 PM

Cool, thanks I've got the editor using the portal.css file to style the content inside the editor now.  However I also want to populate the Styles dropdown with them, however when I choose the folder from the option "List of available styles" it doesn't display the css files.  My guess is that its only looking for JS files as this is how ckeditor populates that list.  Is there any way to use a css file for this at the moment?

Coordinator
Jun 14, 2011 at 9:10 AM

Correct you need to provide an js file i described it here how to create such file

http://dnnckeditor.codeplex.com/discussions/239760. If you want to use a css file. you need to modify the css file as i wrote above by adding the

Jun 14, 2011 at 10:44 PM

Hey, your message got truncated, could you repost please

Coordinator
Jun 15, 2011 at 1:06 PM

Ups sorry didnt noticed that.

You need to modify the css file as wrote above and add the html tags before the css class. Take a look at the sample.css file:

http://nightly.ckeditor.com/7051/_samples/sample.css

and how it look like in the editor

http://nightly.ckeditor.com/7051/_samples/stylesheetparser.html