禁用或使Kendo编辑器只读

4

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

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

我希望在某些条件下禁用或使两个编辑器变为只读,并在其他条件下使其可编辑。
以下是我迄今为止得到的类似需求的链接。 如何在asp.net mvc中禁用kendo编辑器 http://www.telerik.com/community/forums/aspnet-mvc/editor/making-the-editor-disabled-readonly.aspx 我正在使用Kendo UI Web,版本为2012.3.1114。有谁能帮我解决这个问题。
谢谢。

请查看官方参考文档:http://docs.telerik.com/kendo-ui/web/editor/overview#configuration-Apply - Nikhil K S
1个回答

10

如果你只想展示内容,那么那里的答案对于剑道仍然有效,你不需要编辑器。

无论如何

$($('#editorName').data().kendoEditor.body).attr('contenteditable',false)

但是我们可以删除内容,对吧?(通过退格键或在键盘上输入删除)您知道如何禁用contenteditable="false" div中的退格键和删除键吗?https://demos.telerik.com/kendo-ui/editor/immutable-elements - Pabodha Wimalasuriya

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接