Hello Nicklas,
Please clarify what user wants to achieve doing this? At first sight, there could be several ways. The easiest
1) To set the handler for ENTER keydown
2) At keydown set the line in textarea to some storage key
prewindow.localStorage.setItem('last_line', textarea_text);/pre
3) Post this tot db
4) Then when the user enters second line - slice from the whole string that part
you saved in storage
prevar textareaText = Appery("#textarea").val();
var lastLine = window.localStorage.getItem('lastline');
if (lastLine !== undefined) {
var string_to_post = textareaText.slice(lastLine.length);
}/pre
5) Save new string to storage
prewindow.localStorage.setItem('last_line', string_to_post);/pre
6) Then post again
and so on...