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

4 posts, 0 answers
  1. Sri
    Sri avatar
    5 posts
    Member since:
    Dec 2008

    Posted 28 Dec 2008 Link to this post

    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.
  2. Stanimir
    Admin
    Stanimir avatar
    1653 posts

    Posted 29 Dec 2008 Link to this post

    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.

  3. Sri
    Sri avatar
    5 posts
    Member since:
    Dec 2008

    Posted 30 Dec 2008 Link to this post

    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

     

  4. Stanimir
    Admin
    Stanimir avatar
    1653 posts

    Posted 02 Jan 2009 Link to this post

    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.
Back to Top