angularjs - Trigger onChange event of Kendo Editor widget -
suppose have following kendo-editor:
<div kendo-editor ng-model="name" k-options="editoroptions"></div>
then, have following editoroptions
:
function onchange(e) { alert("i changing."); } $scope.editoroptions = { change: onchange };
how can access actual kendo-editor object me trigger onchange event without using normal jquery selection:
example: $("#myeditor").kendoeditor().trigger("change")
you must define control reference in current scope (http://docs.telerik.com/kendo-ui/angularjs/introduction#getting-widget-references) , can define events attribute:
<div ng-app="app" ng-controller="myctrl"> <div kendo-editor="kendoeditorcontrol" ng-model="name" k-options="editoroptions" k-on-change="onchange()"></div> </div> <script> angular.module("app", [ "kendo.directives" ]).controller("myctrl", function($scope) { $scope.onchange = function() { alert($scope.kendoeditorcontrol.value()); }; }); </script>