Upload images while editing and drag it to the doc

Hi,

I need to implement a WYSIWYG editor where a user can upload images and
drag and drop them to the text area.
It's like Wordpress posting function.

Is there any good reference?

Sam