I solved my problem in a 95% like I wanted. I had to make some changes:
<div id="var">
<div id="area1">
to
<textarea id="area1">
Phasellus at libero lectus. Morbi pulvinar, augue non tincidunt consequat
</textarea>
<a href="#" class="button" id="variable" contenteditable="false">
Variable
</a>
Here http://jsfiddle.net/bMLmD/1/ is the result. When I drop the tag a in the text area, the a drops in the cursor place and then fired an alert/ajax/other.
I copy the funcion insert from here: How do I insert some text where the cursor is? Thanks to Tim, to answer that.
Thanks,