This is a migrated thread and some comments may be shown as answers.

Editor Change event

3 Answers 348 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Joshua
Top achievements
Rank 2
Iron
Veteran
Iron
Joshua asked on 03 Jul 2012, 12:07 AM
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?

3 Answers, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 03 Jul 2012, 02:22 PM
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!
0
Charlie
Top achievements
Rank 1
answered on 16 Apr 2015, 12:59 AM
This no longer seems to work with version v2015.1.318  , is there a different selector I should use for an inline editor ?
0
Iliana Dyankova
Telerik team
answered on 17 Apr 2015, 01:18 PM
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!
 
Tags
Editor
Asked by
Joshua
Top achievements
Rank 2
Iron
Veteran
Iron
Answers by
Iliana Dyankova
Telerik team
Charlie
Top achievements
Rank 1
Share this question
or