How can I get the value/text of a dragged element?

How can I get the value/text of a dragged element?

Hello,

Im dragging  an <a> text element into an input field and dropping it.

How can I get the text/value of the element Im dragging and populate an input  text box with it's text?

Thanx