views:

25

answers:

0

I'm building an application that requires the user to drag and drop html elements onto a CKeditor instance. I need to listen for the drop event so I can take action to remove the element that was dropped onto the editor. I see that there's a 'paste' event, but it's not triggered by the drop.

Here's my simple test, using the CKeditor jquery adapter:

// set up instance
$('#editor1').ckeditor();
var editor = $('#editor1').ckeditorGet();

// this gets a list of all events that you can listen for
console.log(editor._.events);

// here's how you listen for an event
editor.on("someEvent", function(e) {
  console.log(e); 
});

I can't find anything in the documentation to shed light on this.

Any ideas?