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

Setting editor to readonly, but keep the toolbar

4 Answers 189 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Delphi
Top achievements
Rank 1
Delphi asked on 20 Sep 2010, 01:32 PM
Howdy,

I am using the editor with a custom button which highlights selected text and allows users to make comments on content. I need to set the content area of the editor to read-only, but I don't want to lose my button functionality. I tried enabled = false but that just dumped the content with no toolbar.

Thanks,
David

4 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 20 Sep 2010, 01:46 PM
Hello David,

You can disable RadEditor on the client using the using the editor.enableEditing(false) method.
You can disable the typing in the content area by setting editor.set_editable(false);, but if a toolbar button is used the content area will become editable.

If you want to have non editable areas in the content area see this article: Editable and Non-editable Areas.

Best regards,
Rumen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Delphi
Top achievements
Rank 1
answered on 20 Sep 2010, 08:15 PM
Thanks, I added the following, but it's erroring

$(

function() {

 

 

var editor = $("#<%=ceContents.ClientID%>");

 

editor.enableEditing(

false);

 

editor.set_editable(

false);

 

});



Error: Object doesn't support this property or method

on the editor.enableEditing line.
0
Accepted
Rumen
Telerik team
answered on 21 Sep 2010, 05:17 PM
Hello David Lozzi,

You have wrote:
var editor = $("#<%=ceContents.ClientID%>");

but you should use

 var editor = $find(<%=ceContents.ClientID%>"");

as well as make sure that the editor is created on the page.

For example in the OnClientLoad event of RadEditor or in the pageLoad() event of ASP.NET AJAX.

Best wishes,
Rumen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Delphi
Top achievements
Rank 1
answered on 27 Sep 2010, 11:09 AM
Awesome, Thanks!
Tags
Editor
Asked by
Delphi
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Delphi
Top achievements
Rank 1
Share this question
or