I have tried using k-content-editable
and well as just the generic data-ng-disabled
but neither of these worked. Looking at the documentation it's not even clear to me there is a way to disable the control.
Asked
Active
Viewed 2,452 times
4

Robert Kaucher
- 1,841
- 3
- 22
- 44
2 Answers
6
You can do this by creating a custom directive:
.directive("kNgDisabled", function() {
return {
restrict: "A",
link: function(scope, element, attr) {
scope.$on("kendoWidgetCreated", function(e, widget) {
var value = scope.$eval(attr.kNgDisabled);
$(widget.body).attr("contenteditable", !value);
scope.$watch(attr.kNgDisabled, function(value) {
$(widget.body).attr("contenteditable", !value);
});
})
}
}
});
Then use it like this:
<textarea kendo-editor k-ng-disabled="disabled"></textarea>
Here is a live demo: http://dojo.telerik.com/@korchev/AdApu

Atanas Korchev
- 30,562
- 8
- 59
- 93
-
Thank you! It's a shame there is no way to do this via the editor itself. – Robert Kaucher Feb 25 '15 at 15:30
2
Add following code in your Angular controller->
var x = document.getElementById("myForm");
x.addEventListener("focus", myFocusFunction, true);
function myFocusFunction() {
$($('#keFinding').data().kendoEditor.body).attr('contenteditable', false);
}

SubhoM
- 771
- 5
- 6