Custom css styles for editor in different site collections

6 posts, 0 answers
  1. Peter Livsey
    Peter Livsey avatar
    44 posts
    Member since:
    Aug 2012

    Posted 18 Apr 2008 Link to this post

    Hi

    I've added the radhtml editor to two of our sharepoint publishing sites (2 different site collections).  Each of these sites uses a differnet css style sheets to change the colour scheme of the site.

    I've added a CssEditor.css file to the:
    \Program Files\Common Files\Microsoft Shared\Web Server Extensions\wpresources\RadEditorSharePoint\4.5.2.0__1f131a624888eeed\RadControls\Editor
    directory which has changed the style in the editor within both sites. 

    Is there any way to create a separate css editor file for each site collection so that the css can then be altered to match each site's scheme? 

    Peter
  2. George
    Admin
    George avatar
    859 posts

    Posted 18 Apr 2008 Link to this post

    Hi Peter,

    It is possible to have unique configuration files (one for lists and one for web parts and publishing fields) for each SharePoint web on your server. Simply create a new configuration file and append the unique ID of the web to the file name. For example:

    If your web has an UID {a63cff5e-cdf5-48d0-898d-f9a24d299f06}, then its custom configuration files should have the following names:

    ConfigFile{a63cff5e-cdf5-48d0-898d-f9a24d299f06}.xml

    ListConfigFile{a63cff5e-cdf5-48d0-898d-f9a24d299f06}.xml

    ToolsFile{a63cff5e-cdf5-48d0-898d-f9a24d299f06}.xml

    ListToolsFile{a63cff5e-cdf5-48d0-898d-f9a24d299f06}.xml

    Note, that this approach is useful in web part and list scenarios. For the WCM scenario, you can already set the configuration files properties through SharePoint Designer - Setting ConfigFile and ToolsFile properties for the WCM field

    If you do not know the UID of the SharePoing web, we offer a simple way to get it using RadEditor for MOSS. Look at the following article for more information - Get the UID of a SharePoint Web with RadEditor for MOSS

    I hope this helps.

    Have a great weekend, George
    the Telerik team


    Instantly find answers to your questions at the new Telerik Support Center

  3. Peter Livsey
    Peter Livsey avatar
    44 posts
    Member since:
    Aug 2012

    Posted 18 Apr 2008 Link to this post

    This is useful for the toolbar settings, but how do we set a custom CSS Style sheet for the editor in each site collection?  We want the 'Apply CSS Class' and Heading dropdown item styles to reflect the stylesheet, as well as the editor window showing the marked up style.

    Adding the CssEditor.css file to directory affected all sites.  I've tried adding the guid of each site to the css file name eg CssEditor{0353a5b6-d39b-4f7b-9d2d-c59f44378479}.css but this didn't seem to have any effect.
  4. Peter Livsey
    Peter Livsey avatar
    44 posts
    Member since:
    Aug 2012

    Posted 18 Apr 2008 Link to this post

    This is useful for the toolbar settings, but how do we set a custom CSS Style sheet for the editor in each site collection?  We want the 'Apply CSS Class' and Heading dropdown item styles to reflect the stylesheet, as well as the editor window showing the marked up style.

    Adding the CssEditor.css file to directory affected all sites.  I've tried adding the guid of each site to the css file name eg CssEditor{0353a5b6-d39b-4f7b-9d2d-c59f44378479}.css but this didn't seem to have any effect.
  5. Peter Livsey
    Peter Livsey avatar
    44 posts
    Member since:
    Aug 2012

    Posted 18 Apr 2008 Link to this post

    This is useful for the toolbar settings, but how do we set a custom CSS Style sheet for the editor in each site collection?  We want the 'Apply CSS Class' and Heading dropdown item styles to reflect the stylesheet, as well as the editor window showing the marked up style.

    Adding the CssEditor.css file to directory affected all sites.  I've tried adding the guid of each site to the css file name eg CssEditor{0353a5b6-d39b-4f7b-9d2d-c59f44378479}.css but this didn't seem to have any effect.
  6. George
    Admin
    George avatar
    859 posts

    Posted 18 Apr 2008 Link to this post

    Hi Peter,

    Once you have your unique ConfigFile.xml (e.g ConfigFile{a63cff5e-cdf5-48d0-898d-f9a24d299f06}.xml) you can set the editor's ConfigFile property to point to the whanted CssEditor1.css or CssEditor2.css

    For more information on how to set the editor's properties via Config File please review the following help article:
    http://www.telerik.com/help/radeditormoss/SetPropertiesViaConfigFile.html


    Here is an example that shows how to set the CssFiles property to point to a CustomFile.css:
    < property name = "CssFiles">
    < item > /_wpresources/RadEditorSharePoint/CustomCssFile.css </ item >
    </ property >


    I hope this helps.

    Have a great weekend,
    George
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top