jQuery Example: Inserting text with drag n’ drop

I’ve got another real world example of how to use jQuery to enhance your website. A friend emailed me this morning wondering if it was possible to insert text using the click event or drag n’ drop into a textarea. jQuery and jQuery UI to the rescue! Review the screenshots below or just go check out the demo page.

3 Comments

  1. Shaun,

    That is a cool idea. You might want to add a .css(”cursor”, “pointer”) in there or update your CSS file with the same for the links on the left as an improvement?

    Bill

  2. Shaun Kester says:

    Good point. Done!

  3. Jamie says:

    Possible to do the same thing with a div? For instance, say I have selected some text within a DIV, would it be possible to paste the text over the selection doing some sort of innerHTML replace?

Leave a Reply