This is a migrated thread and some comments may be shown as answers.

Specify which CSS Styles to display

12 Answers 157 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
John Way
Top achievements
Rank 1
John Way asked on 16 Aug 2007, 08:49 PM
How do I configure the MOSS radEditor (Premium version) to only show CSS styles from specific CSS files?

Thanks,
John W.

12 Answers, 1 is accepted

Sort by
0
LarsA
Top achievements
Rank 1
answered on 17 Aug 2007, 10:50 AM
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.
0
Georgi Tunev
Telerik team
answered on 17 Aug 2007, 02:43 PM
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
0
John Way
Top achievements
Rank 1
answered on 17 Aug 2007, 06:32 PM
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

0
ajd
Top achievements
Rank 1
answered on 24 Apr 2009, 10:05 AM

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.
0
Stanimir
Telerik team
answered on 24 Apr 2009, 01:41 PM
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.
0
ajd
Top achievements
Rank 1
answered on 26 Apr 2009, 08:01 AM
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

?

0
Stanimir
Telerik team
answered on 28 Apr 2009, 12:09 PM
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.
0
Archana
Top achievements
Rank 1
answered on 04 Jun 2009, 08:37 AM
Hi Stanimir,

How to decide where we have to make changes for config properties - in ConfilFile.xml or ListConfigFile.xml
0
Stanimir
Telerik team
answered on 04 Jun 2009, 09:00 AM
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.
0
Archana
Top achievements
Rank 1
answered on 04 Jun 2009, 10:04 AM
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
0
Stanimir
Telerik team
answered on 04 Jun 2009, 11:08 AM
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.
0
Archana
Top achievements
Rank 1
answered on 04 Jun 2009, 12:19 PM
Hi Stanimir,

Thanx a lot. Its working fine now
Tags
WebParts for SharePoint
Asked by
John Way
Top achievements
Rank 1
Answers by
LarsA
Top achievements
Rank 1
Georgi Tunev
Telerik team
John Way
Top achievements
Rank 1
ajd
Top achievements
Rank 1
Stanimir
Telerik team
Archana
Top achievements
Rank 1
Share this question
or