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

Setting default font in RadHtmlField

3 Answers 122 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
AlexAngas
Top achievements
Rank 1
AlexAngas asked on 04 Jun 2009, 03:36 PM
Hello,

I'm attempting to change the default font from Times New Roman to Verdana in the RadHtmlField. I'm using the JavaScript technique in http://www.telerik.com/community/forums/sharepoint-2003/controls/change-default-font-for-moss-rad-editor.aspx and http://www.telerik.com/help/aspnet/editor/settingdefaultfont.html. I don't want the change to apply across all web applications on my server so I'm using the ConfigFile property of RadHtmlField. My config file is living in /_layouts/1033.

This doesn't appear to work at all. I'm not even sure if my config file is being read.

Any thoughts?

Thanks, Alex.

3 Answers, 1 is accepted

Sort by
0
Stanimir
Telerik team
answered on 05 Jun 2009, 07:21 AM
Hi Alex,

You can add your custom styles in the following location:

/Program Files/Common Files/Microsoft Shared/web server extensions/wpresources/RadEditorSharePoint/4.5.6.0__1f131a624888eeed/RadControls/Editor/CssEditor.css

This file is not created by default when you install RadEditor for MOSS. However, if it is present, the editor will automatically load it. Note that the folder name depends on the editor version (in this case it is 4.5.6.0). Also do not forget to back up the CssEditor.css file when you uninstall/upgrade the editor.

The CssEditor.css file will also be automatically loaded in presentation mode (i.e. when the editor is not visible) in the Web Part and Publishing field (WCM) scenarios. The file will not be loaded in presentation mode when the editor is used in a list (e.g. wiki). This is because we cannot modify the page and add it when the editor is invisible. To workaround this problem you can include this file manually to the master page (using SharePoint Designer) or add it in the MOSS core CSS styles. Either way it will be automatically loaded in presentation as well as authoring (editing) mode. For example, to add the CssEditor.css file in the default MOSS styles, open the file

/Program Files/Common Files/Microsoft Shared/web server extensions/12/Template/Layouts/1033/Styles/CORE.CSS

and add the following line:

@import url("/_wpresources/RadEditorSharePoint/4.5.6.0__1f131a624888eeed/RadControls/Editor/CssEditor.css");



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
AlexAngas
Top achievements
Rank 1
answered on 05 Jun 2009, 08:27 AM
Hello Stanimir,

I don't want to add custom styles (I've seen the documentation about that). I want to change the default editing font in a RadHtmlField. Could you please help with that?

Thank you,

Alex.
0
Accepted
Stanimir
Telerik team
answered on 08 Jun 2009, 07:25 AM
Hello Alex,

In order to change the default editing font in a RadHtmlField you need to import the following custom style in the RadEditor's content area.
Example with Verdana font:
body 
    font-familyVerdana

In order to do this you need to create the CssEditor.css file, place it in the mentioned in the article folder and add the body style in it .

I hope this helps.

Greetings,
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.
Tags
WebParts for SharePoint
Asked by
AlexAngas
Top achievements
Rank 1
Answers by
Stanimir
Telerik team
AlexAngas
Top achievements
Rank 1
Share this question
or