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

How to restrict user from changin Font family and font size in rad editor

3 Answers 124 Views
WebParts for SharePoint
This is a migrated thread and some comments may be shown as answers.
Sri
Top achievements
Rank 1
Sri asked on 28 Dec 2008, 08:41 AM
i want to use radeditor as custom field in sharepoint
and in that I should restrict user from changing Font family and font size in rad editor.
By default font family should be times new roman and font size 10.

3 Answers, 1 is accepted

Sort by
0
Stanimir
Telerik team
answered on 29 Dec 2008, 01:01 PM
Hello Sri,


In order to remove the FontName and FontSize tools from RadEditor you need to modify the respective ToolsFile.xml, located in Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\5.3.2.0__1f131a624888eeed\Resources folder (5.3.2.0__1f131a624888eeed depends on the version of the control).
Just remove the following lines and the both toolls will not appaer in the toolbar.
<tool name="FontName" /> 
<tool name="FontSize" /> 


In addition you can review the Defining custom CSS styles article in our online help. There you will find information on how to define different default styles in the content area of the editor.

Sincerely yours,
Stanimir
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Sri
Top achievements
Rank 1
answered on 30 Dec 2008, 09:39 AM
Hi,

Thanks for the reply,

It worked fine. But i want to build a custom sharepoint control using rad editor.
in this control I want to programatically disable the font-family and font-size.

I have tried the following code but it didn't work 

If

radEditorControl.FindTool("FontName") IsNot Nothing Then

 

radEditorControl.FindTool(

"FontName").Visible = False

 

 

End If

 

 

If radEditorControl.FindTool("FontSize") IsNot Nothing Then

 

radEditorControl.FindTool(

"FontSize").Visible = False

 

 

End If

 

0
Stanimir
Telerik team
answered on 02 Jan 2009, 08:38 AM
Hi Sri,

You can change the tools state on the client side as well. Please review the Set Button State article in our online help.

I hope this helps.


Greetings,
Stanimir
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
WebParts for SharePoint
Asked by
Sri
Top achievements
Rank 1
Answers by
Stanimir
Telerik team
Sri
Top achievements
Rank 1
Share this question
or