Handle Blur and Focus Events

The Kendo UI Editor does not expose focus and blur events as built-in functionalities.

However, regardless of the initialization mode you apply to the widget, it is possible for you to handle them by using JavaScript.

For more information on how to handle the blur and focus events in AngularJS applications, refer to the how-to article on AngularJS.

The following example demonstrates how to handle the blur and the focus events of the Editor.

Example
    <style>
      #editor{
        position: absolute;
        width: 90%;
        top: 60px;
      }
    </style>
    <body>
      <textarea id="editor"></textarea>
      <script>
        var editor = $('#editor').kendoEditor().data('kendoEditor');
        $(editor.body).focus(function(){
          console.log('Focus');
        }).blur(function(){
          console.log('Blur')
        });
      </script>

See Also

For more runnable examples on the Kendo UI Editor, browse its How To documentation folder.

In this article
Not finding the help you need? Improve this article