开发者

Drag and drop an image from desktop to a web text editor (implementation in JavaScript)

I want to implement a web text editor able to recognize when the user drag a image file over it's editing surface and it automa(gically) starts the upload and insert the image near the cursor position.

In other words I don't want the user to do the usual "insert->image->browse->ok".

At the moment I am not very good at JavaScript. I know jQuery but I have not a clear ide开发者_StackOverflow社区a about how to implement this. I don't know if there's an event handler able to help me in this situation; if not then there should be I think or web apps would miss some kind of interactivity.

I've heard miracles about HTML5 could it help me?

I've seen such things in Google Wave but that surface doesn't seem to be a form field... Google lab's black magic I guess....


  • There's a SO bounty question about Copy&Pasting images into a WYSIWYG editor (not entirely what you want but maybe also interesting)

  • HTML 5 has drag & drop uploads that should be possible to extend into a "drag into web page" functionality - at least almost.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜