禁用或使Kendo Editor成为只读

时间:2022-09-11 17:36:15

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

我在我的一个页面中使用了Kendo UI编辑器。以下是使用的语法。

$("#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

以下是我到目前为止所遇到的类似要求的链接。如何在asp.net mvc中禁用kendo编辑器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.

我正在使用Kendo UI Web,版本 - 2012.3.1114任何人都可以帮助我。

Thanks

1 个解决方案

#1


8  

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)

#1


8  

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)