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

Disabling editor on serverside makes the editor invisible!

1 Answer 25 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Vithiya
Top achievements
Rank 1
Vithiya asked on 15 May 2009, 07:17 PM
I have the radeditor on my page where I need to enable and disable the editor based on a radio button click. It is working fine by just setting the 'Enabled' property of the radeditor on server side. But the problem is that the radeditor then becomes invisible. The user will not know that there is a control unless he or she clicks on the radio button to enable it. How can I make the editor show up but in a disabled state?

Thank you,
Vithiya

1 Answer, 1 is accepted

Sort by
0
Lini
Telerik team
answered on 18 May 2009, 07:39 AM
Hello Vithiya,

The "Enabled" server property of the editor will hide it and render only the content when set to false. If you want to still see the editor, but disable editing, you can do that in the browser with a bit of JavaScript:

<telerik:RadEditor ID="RadEditor1" runat="Server" /> 
<script type="text/javascript"
function enableEditor() 
    var editor = $find("RadEditor1"); 
    editor.enableEditing(true); 
function disableEditor() 
    var editor = $find("RadEditor1"); 
    editor.enableEditing(false); 
</script> 
<asp:RadioButton id="EnableEditor" runat="server" Text="Enable" Checked="true" GroupName="editorGroup" onclick="enableEditor()"></asp:RadioButton> 
<asp:RadioButton id="DisableEditor" runat="server" Text="Disable" GroupName="editorGroup" onclick="disableEditor()"></asp:RadioButton> 


Sincerely yours,
Lini
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
Vithiya
Top achievements
Rank 1
Answers by
Lini
Telerik team
Share this question
or