ContentEditable DIV - disabling drag and drop
- by sonofdelphi
Is it possible to disable the drag-and-drop functionality on elements which have the contentEditable attribute set to true.
I have the following HTML page.
<!DOCTYPE html>
<html><meta charset="utf-8"><head><title>ContentEditable</title></head>
<body>
<div contenteditable="true">This is editable content</div>
<span>This is not editable content</span>
<img src="bookmark.png" title="Click to do foo" onclick= "foo()">
</span>
</body>
</html>
The main problem I'm facing is that it is possible to drag and drop the image into the DIV and it gets copied (along with the title and the click handler)