[drag-and-drop] include Range of drop target in drag and drop events

Hi,

I'm playing around with drag-and drop in rich text editor. The drop event
gives me quite a bit of information on "where" the drop event occurred
(clientX/Y, target element, etc...), but the event doesn't tell me the most
important thing I need to know for dropping in text.

If I drag content from a text editor onto text that is in my text editor (a
contentEditable element) the system draws a caret in the editor text where
the dragged text will be inserted. This caret is *not* window.selection,
it's something else, but so far I and other devs can't figure out how to
get the position (as in Range) of that very important thing.

It seems the drag and drop events should tell us where within text the drop
is happening? Or is there a reason why it shouldn't? Can this be changed?

Thanks,

Oliver.

Received on Sunday, 19 April 2015 00:38:20 UTC