Editor missing disable property

1 Answer 148 Views
Editor wrapper
Giuseppe
Top achievements
Rank 1
Giuseppe asked on 08 Nov 2021, 11:00 AM

Hi All,

i need to disable the input of an Editor control in my vuejs project but seems that Kendo-Editor do not have a property like contenteditable/disabled/readonly i prefer not to deal with a layer of some z-index div to workaround this needs.

Is there any way (like the one with jquery to set the contenteditable to false) to achive this?

 

Thanks a lot

1 Answer, 1 is accepted

Sort by
0
Petar
Telerik team
answered on 08 Nov 2021, 12:24 PM

Hi Giuseppe,

Here is a StackBlitz example demonstrating how the contenteditable can be used in the context of the Kendo UI for Vue Editor Wrapper. The code that makes Editor's content readonly is the one you can find in the mounted hook of the solution:

var editor = this.$refs.editor.kendoWidget(),
  editorBody = $(editor.body);

// Make the Editor read-only.
editorBody
  .removeAttr('contenteditable')
  .find('a')
  .on('click.readonly', false);

Check the sample project and let me know if you have questions about it.

Regards,
Petar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Editor wrapper
Asked by
Giuseppe
Top achievements
Rank 1
Answers by
Petar
Telerik team
Share this question
or