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

Set Default font name in moss RadEditor

2 Answers 50 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Manoj
Top achievements
Rank 1
Manoj asked on 25 Nov 2010, 01:46 PM
Hi Telerik,
I need to set the default font name as "Arial" in the Font dropdown.

I have seen some article in telerik knowledge article as given below
"The contents of this collection will override the default fonts available in the Font dropdown. In order to extend the default set you should add the default font names and the new font names."
private void Page_Load(object sender, EventArgs e)
{
   RadEditor1.FontNames.Add(
"Arial"
);
}
But in our case the control has been developed as customfield and written code as

protected 

 

override void OnLoad(EventArgs e)

 

 

 

{
if (base.ControlMode != SPControlMode.Display)

 

 

  {

 

 

 

   this.radEditorControl.FontNames.Add("Arial"); 
  }
}
I need only arial as a font in our content editor, so i have override the fontnames and add only one font as "Arial". The code is compiled without any errors. But font is not appearing to the font dropdown list in content editor. Please help on this

Thanks in advance

 

2 Answers, 1 is accepted

Sort by
0
Stanimir
Telerik team
answered on 29 Nov 2010, 08:21 AM
Hello Manoj,

Review the following two help articles:
http://www.telerik.com/help/aspnet-ajax/fonts.html
http://www.telerik.com/help/aspnet-ajax/defining-custom-css-styles.html

Here is an example of what you need to do.
1. Add CssEditor.css file in the /Program Files/Common Files/Microsoft Shared/web server extensions/wpresources/RadEditorSharePoint/5.x.x.0__1f131a624888eeed/Resources/ folder and define the following style in it:
body
{
    font-family: Arial;
}

2. Modify the ToolsFile.xml or ListToolsFile (for lists, wiki, blog), which are located in the mentioned above folder. Add the following elements just before the ending </root> element:
<fontNames>
    <item name="Arial" />
</fontNames>



Kind regards,
Stanimir
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Mr. Rajesh
Top achievements
Rank 1
answered on 03 Dec 2010, 11:56 AM
Hi Stanimir,

It is working now, Thanks
Tags
General Discussions
Asked by
Manoj
Top achievements
Rank 1
Answers by
Stanimir
Telerik team
Mr. Rajesh
Top achievements
Rank 1
Share this question
or