how to load css classes from my own project specfi

2019-07-13 19:15发布

问题:

how to load css classes from my own project specfic css in Sitecore's RAD editor? I want to give option to client to add predefined css class to any needed element.

回答1:

Put the css in default.css in your websites' root folder and restart IIS. Sitecore RAD editor should pick up the classes, although we found it could take a couple of restarts.



回答2:

Depending on the version of Sitecore you're using there's different ways since in 6.4 there is a new wysiwyg from Telerik's updated library.

pre 6.4 Multisite Rich Text Editor Custom CSS

6.4+ Multisite Rich Text Editor Custom Css



回答3:

As stated by Adam you can add this to the default.css file. However if you want to move the CSS file else where then you need to updated the following setting in the web.config (this is the Sitecore 6 setting name, it maybe different in early versions):

<setting name="WebStylesheet" value="default.css" />