Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable or make the Kendo Editor Read-only

I am using Kendo UI Editors in one of my pages. Below is the syntax used.

$("#editorKendo1").kendoEditor();
$("#editorKendo2").kendoEditor();

I want to either disable or make both of the editors read-only on some condition and make it editable on some other condition.

Below are the links to the similar requirement i have got so far. How can i disable kendo editor in asp.net mvc http://www.telerik.com/community/forums/aspnet-mvc/editor/making-the-editor-disabled-readonly.aspx

I am using Kendo UI Web, Version - 2012.3.1114 Can anyone help me with this.

Thanks

like image 743
Vishnu Ram Avatar asked Dec 27 '22 01:12

Vishnu Ram


1 Answers

Answers there are still valid for Kendo. You do not need the editor if you are going to just show the content.

Anyway

$($('#editorName').data().kendoEditor.body).attr('contenteditable',false)
like image 100
Petur Subev Avatar answered Jan 08 '23 02:01

Petur Subev