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

Editor show the error and also in read-only mode

1 Answer 253 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Rajan
Top achievements
Rank 1
Rajan asked on 10 Sep 2015, 10:24 AM

Hi all,

we are the new one to kendo ui and we develop the applications UI, completely based on html & JQuery. FYI, The pages are open based on left hand side menu (div) to right side (div tag). (check below code : formholder is right side div tag).

$('#formholder').load(page, function () {           
            $('#formholder').show("slide", { direction: "left" }, 500);        }); 

we use the Kendo UI Editor in one html page, we got the below error (screen shot also attached). and also Editor was open as read only mode (disabled mode) so we can't able to enter any value. if we use refresh() method in DOM (after press F12 and then run refresh() method in console) directly the control will be enabled. FYI, we use Chrome browser, we check the same in mozila also but still we are facing the issue. So, please anyone help us to go for further.

 " Uncaught TypeError: Cannot use 'in' operator to search for 'getSelection' in undefined "

 

The code :

$(document).ready(function () { $('#txtbody').kendoEditor({  tools: [ "bold", "italic", "underline", "strikethrough", "justifyLeft", "justifyCenter", "justifyRight", "justifyFull", "insertUnorderedList",   "insertOrderedList", "indent", "outdent", "createLink", "unlink", "insertImage", "insertFile", "subscript", "superscript", "createTable", "addRowAbove", "addRowBelow", "addColumnLeft", "addColumnRight", "deleteRow", "deleteColumn", "viewHtml", "formatting", "cleanFormatting", "foreColor", "backColor", "print"] });
  CONEMAIL.loadeditor();});

JS file

var CONEMAIL = {
loadeditor: function () { var editor = $("#txtbody").data("kendoEditor"); editor.refresh();
};

 

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 14 Sep 2015, 08:17 AM
Hi Rajan,

The Editor can become readonly if it is moved in the DOM. Possible solutions include:

- call the refresh() method after the Editor has been moved in the DOM and when it should be ready for use
http://docs.telerik.com/kendo-ui/web/editor/troubleshooting#editor-inside-a-popup-is-readonly-in-firefox

- use the Editor's inline mode, which does not include an iframe
http://docs.telerik.com/kendo-ui/web/editor/overview#classic-mode-vs-inline-mode

Let me know if you have further questions.

Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Editor
Asked by
Rajan
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or