Handle Blur and Focus Events

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

However, regardless of the initialization mode you apply to the widget, you can handle them by using JavaScript. For more information, refer to the how-to article on handling focus and blur in AngularJS.

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

    <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

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