Specify which CSS Styles to display

13 posts, 0 answers
  1. John Way
    John Way avatar
    16 posts
    Member since:
    Mar 2005

    Posted 16 Aug 2007 Link to this post

    How do I configure the MOSS radEditor (Premium version) to only show CSS styles from specific CSS files?

    Thanks,
    John W.
  2. LarsA
    LarsA avatar
    1 posts
    Member since:
    Aug 2007

    Posted 17 Aug 2007 Link to this post

    I have the same problem, if I specify the folder in ConfigFile.xml, like
    <property name="CssFiles">/style%20library/someFolder/style_rad.css</property>

    it still shows all the styles from the page, and not only those specified in the style_rad.css

    Thanks
    Lars C.A.

  3. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 17 Aug 2007 Link to this post

    Hi guys,

    CssFiles property in the editor's ConfigFile accepts multiple items, so the correct syntax is:

    <property name="CssFiles">
        <item>/_wpresources/RadEditorSharePoint/4.3.2.0__1f131a624888eeed/RadControls/Editor/MyStyles.css</item>
    </property>


    Also please make sure that you are editing the appropriate ConfigFile - it differs depending on the scenario (ListConfigFile.xml / ConfigFile.xml) 



    Kind regards,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  4. John Way
    John Way avatar
    16 posts
    Member since:
    Mar 2005

    Posted 17 Aug 2007 Link to this post

    Works perfectly!

    A couple tips....
    1. I reference the .css in it's default SharePoint location at
      <property name="CssFiles">  
          <item>/Style%20Library/myStyles.css</item> 
        </property> 
       
    2. I create a separate folder for my config files outside of the versioned folders so that I don't have to move them for each component update
       ....\wpresources\RadEditorSharePoint\RadConfigFiles\Site1\Site1_ConfigFiles.xml
    3. Also, if you modify the default ConfigFile.xml  and ToolsFile.xml files, they get deleted upon removing the SharePoint solution to upgrade to the newer component.

    Thanks again for a wonderful support experience. You guys are the best.
    See you at DevConnections.
    John

  5. ajd
    ajd avatar
    8 posts
    Member since:
    Nov 2008

    Posted 24 Apr 2009 Link to this post


    So, a CssFiles item element can point to a css file in a SharePoint document library?

    How do you specify the location of the ConfigFile.xml file to use? Can I put my ConfigFile.xml anywhere on disk. If so, how does the editor know where to read it from?

    Does all this still apply to the latest version (5.4)  for the full version of RadEditor for MOSS?

    Thanks.
  6. Stanimir
    Admin
    Stanimir avatar
    1653 posts

    Posted 24 Apr 2009 Link to this post

    Hi ajd,

    You can not put your ConfigFile.xml anywhere in the disc. If you are using RadEditor for MOSS v 5.x it should be in Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\5.x.x.x__1f131a624888eeed\Resources folder.

    If you are using the light version of the RadEditor for MOSS the configuration files should be in /Program Files/Common Files/Microsoft Shared/web server extensions/wpresources/RadEditorSharePoint/4.5.x.x__1f131a624888eeed/RadControls/Editor/ folder.


    Regards,
    Stanimir
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  7. ajd
    ajd avatar
    8 posts
    Member since:
    Nov 2008

    Posted 26 Apr 2009 Link to this post

    Thanks for the reply.

    So what is John Way referring to when he states:

    I create a separate folder for my config files outside of the versioned folders so that I don't have to move them for each component update
     ...\wpresources\RadEditorSharePoint\RadConfigFiles\Site1\Site1_ConfigFiles.xml

    ?

  8. Stanimir
    Admin
    Stanimir avatar
    1653 posts

    Posted 28 Apr 2009 Link to this post

    Hello ajd,

    If you replace the tag of the default editor <PublishingWebControls:RichHtmlField ... >  with the RadEditor tag: <telerik:RadHtmlField id="Content" FieldName="..." runat="server"></telerik:RadHtmlField>, using the SharePoint designe, you can set the ConfigFile property to point to other than Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\5.x.x.x__1f131a624888eeed\Resources location. But if you use it only by enabling it from SiteFieatures the path to the config filr can not be changed.


    Sincerely yours,
    Stanimir
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  9. Archana
    Archana avatar
    18 posts
    Member since:
    May 2009

    Posted 04 Jun 2009 Link to this post

    Hi Stanimir,

    How to decide where we have to make changes for config properties - in ConfilFile.xml or ListConfigFile.xml
  10. Stanimir
    Admin
    Stanimir avatar
    1653 posts

    Posted 04 Jun 2009 Link to this post

    Hello Archana,

    You can find how to set properties in RadEditor for MOSS via Config File in the following help article http://www.telerik.com/help/aspnet-ajax/set-properties-via-config-file.html.

    In general ConfigFile.xml is for Web Part and WCM scenario and ListCofigFile.xml is for SharePoint forms scenario (Lists, Wikis, Blogs, etc.).

    I hope this helps.


    Kind regards,
    Stanimir
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  11. Archana
    Archana avatar
    18 posts
    Member since:
    May 2009

    Posted 04 Jun 2009 Link to this post

    Hi Stanimir,

    Thanks. One more thing
    I am using radEditor 5.4 version.
    I have added custom style-sheet CssEditor.css and made the necessary changes in ConfigFile.xml as follows:
      <property name="CssFiles">
          <item>/_wpresources/RadEditorSharePoint/5.4.0.0__1f131a624888eeed/Resources/CssEditor.css</item>
     </property>

    The problem is - in the css dropdown box, along with the custom styles from CssEditor, default styles are also appearing which i suppose it is reading from HtmlEditorCustomStyles.css and HtmlEditorTableFormats.css.
    Is there any way to avoid those default styles to appear in dropdown?

    Regards,
    Archana
  12. Stanimir
    Admin
    Stanimir avatar
    1653 posts

    Posted 04 Jun 2009 Link to this post

    Hello Archana,

    In order to set the CssFiles collection you need to modify the respective ToolsFile.xml ListToolsFile.xml (for forms scenarios such as list, wiki, blog ...), which are located in \Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\5.4.1.0__1f131a624888eeed\Resources folder.

    For example add the following code.
    <cssFiles> 
        <item name="/_wpresources/RadEditorSharePoint/5.4.1.0__1f131a624888eeed/Resources/CssEditor.css" /> 
    </cssFiles> 

    This will stop the loading of the default MOSS styles.

    Also please remove the following code form your config files.
     <property name="CssFiles"
          <item>/_wpresources/RadEditorSharePoint/5.4.0.0__1f131a624888eeed/Resources/CssEditor.css</item> 
    </property> 

    I hope this helps.



    Best wishes,
    Stanimir
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  13. Archana
    Archana avatar
    18 posts
    Member since:
    May 2009

    Posted 04 Jun 2009 Link to this post

    Hi Stanimir,

    Thanx a lot. Its working fine now
Back to Top