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

[Solved] Disable editing in textarea of RadEditor

1 Answer 216 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Babita Sobhani
Top achievements
Rank 1
Babita Sobhani asked on 12 Aug 2009, 01:53 PM
Hi All

I want to disable any editing in textarea of RadEditor control anonly the text  should be visible.
I tried to implement following function on "OnClientLoad"

function

 

OnClientLoad(editor, args)

 

{

editor.add_modeChange(

function(editor, args)

 

{

 

var mode = editor.get_mode();

 

 

if (mode == 2)

 

{

 

var htmlMode = editor.get_textArea(); //get a reference to the Html mode textarea

 

htmlMode.disabled =

"true";

 

}

});

}


But I recieved the error:
Exception while executing client event OnClientLoad Error:Object doesn't support this property or method.

Please tell me how to keep the textarea disabled.

Thanks in advance !!

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 12 Aug 2009, 02:13 PM
Hi Babita,

Is it possible that you are using an older version of Telerik.Web.UI.dll?

For your convenience I have attached a sample project and video demonstrating how the code works with the latest Q2 2009 version of RadEditor for ASP.NET AJAX.

Best 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
Babita Sobhani
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or