Found a solution but I'm still open for more elegant ones ;)
Here's the new fiddle: http://jsfiddle.net/t3qRL/2/
Updated javascript:
document.observe('dom:loaded', function () {
$$('body')[0].on('click', '.txt_area', function (event, element) {
event.stopPropagation();
var div_text = element.innerHTML;
element.hide();
var text_area = element.next('textarea');
text_area.show();
text_area.value = div_text;
text_area.onmouseover = function () {
text_area.observe('click', function(event) {
Event.stop(event);
});
}
text_area.onmouseout = function () {
$$('html')[0].on('click', function () {
console.log(text_area.value);
element.show();
element.update(text_area.value);
text_area.hide();
});
}
});
});