Editor Change event

4 posts, 0 answers
  1. Joshua
    Joshua avatar
    66 posts
    Member since:
    May 2012

    Posted 02 Jul 2012 Link to this post

    I know that I can use the change event to know when the editor loses focus after content changes. I need to be able to know when the editor loses focus, even if the content has not changed.

    Is there a way to do this?
  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2595 posts

    Posted 03 Jul 2012 Link to this post

    Hi Joshua,

    In order to achieve the desired behavior you could use a jQuery blur event, which occurs when an element loses focus. Hence, you need to hook up to the iframe window. For example: 
    $(document).ready(function() {
      // create Editor from textarea HTML element with default set of tools
      $("#editor").kendoEditor({});
      var editor = $("#editor").data("kendoEditor");
      $(editor.window).blur(function(){
        // do sth.
      })
    });

    I hope this helps.

     

    Regards,
    Iliana Nikolova
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. Charlie
    Charlie avatar
    5 posts
    Member since:
    Mar 2015

    Posted 15 Apr 2015 in reply to Iliana Nikolova Link to this post

    This no longer seems to work with version v2015.1.318  , is there a different selector I should use for an inline editor ?
  5. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2595 posts

    Posted 17 Apr 2015 Link to this post

    Hi Charlie,

    The suggested solution will not work for Kendo UI Inline Editor because it has a different structure. However the following code snippet should help for Inline Editor: 
    $(document).ready(function() {
      // create Inline Editor
      $("#editor").kendoEditor({  /* ... */ });
      var editor = $("#editor").data("kendoEditor");
      $(editor.element).blur(function(){
         //....
      })
    });


    Regards,
    Iliana Nikolova
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready