Use the ondrop
event.
myEditor.ondrop = function preventDrop (e) {
e.preventDefault();
};
But, if change tracking is what you are actually after, there's no need to prevent drag and drop. Just use the ondrop
event to track the change. And for newer browsers, just use oninput
. That will detect changes regardless of the input method.