Okay!... I\'m facing this for hours now...
html
try taking a look at this question perhaps? slightly different situation as he's trying to communicate to the server, but i think the answer should be similar.
this code was previously posted by Gert G, but it seems to have disappeared. the code below seems to work flawlessly, so rep to Gert G on this one.
$('div').keydown(function(){
$('textarea').val($(this).html());
});
$('textarea').keydown(function(){
$('div').html($(this).val().replace(/\n/g,"
"));
})