Okay!... I\'m facing this for hours now...
html
This code works in Firefox:
$(document).ready(function(){
$('div').keydown(function(){
$('textarea').val($(this).html().replace(/
/g,"\n"));
});
$('textarea').keydown(function(){
$('div').html($(this).val().replace(/\n/g,"
"));
})
});
Then, if you're using Opera, the browser makes line breaks as ..... IE, which Reigel probably use, probably adds those tags. Seems there's no real standard way on how to handle line breaks when the DIV tag is contenteditable.