[whatwg] contentEditable and drag and drop cancel

On Tue, Jan 31, 2012 at 10:51 PM, Ryosuke Niwa <rniwa at webkit.org> wrote:

> On Tue, Jan 31, 2012 at 10:16 PM, Charles Pritchard <chuck at jumis.com>wrote:
>
>> **
>> Yes, that's correct -- I'm testing on Chrome.
>>
>> I'd like to drag and drop a file from the desktop into a position in the
>> contentEditable with one action.
>> But, it seems that I have to cancel the default action of drag (to get
>> the file)
>>
>
> Why do you have to do that? And when?
>

I think I understand what you're saying now. For your use case, you should
use dropzone content attribute:
http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#the-dropzone-attribute

Then all you have to write is a drop event handler where you have access to
clipboard data.

- Ryosuke

Received on Tuesday, 31 January 2012 22:55:25 UTC