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

Make Editor ReadOnly at design time.

1 Answer 71 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Santosh Pradhan
Top achievements
Rank 1
Santosh Pradhan asked on 12 Jul 2009, 09:43 PM
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

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 14 Jul 2009, 11:37 AM
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.
Tags
Editor
Asked by
Santosh Pradhan
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or