Make Editor ReadOnly at design time.

2 posts, 0 answers
  1. Santosh Pradhan
    Santosh Pradhan avatar
    10 posts
    Member since:
    Jul 2009

    Posted 12 Jul 2009 Link to this post

    I am building a review function where user can read the document and provide feedback without changing the text. But when user provides feedback, user selects the text, highlights it and writes comments in another text box. To achive this functionality I want the editor to appear with its tool bar (or may be without a tool bar) and contents in ReadOnly mode, where user can not change the text but may be able to change the formatting such as changing background color or forecolor. Is there any server side or design time setting I can use to have the page rendered the way I want it to work?

    Thanks,
    Santosh
  2. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 14 Jul 2009 Link to this post

    Hi Santosh Pradhan,

    You can use the following code to achieve your scenario:

    <script type="text/javascript"
    function OnClientLoad(editor) 
         editor.enableEditing(false);  //disable the toolbar and content area
         var tool = editor.getToolByName("ForeColor"); //enable the fore color tool
         tool.setState(0); 
          
    </script> 
    <telerik:RadEditor ID="RadEditor1" runat="server" OnClientLoad="OnClientLoad"
        <Content>sample content</Content> 
    </telerik:RadEditor>  




    Kind regards,
    Rumen
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top