Feature for jotting down notes, creating a break between lines without any information present

I'm currently working on implementing a note-taking feature for my web application. However, I have encountered two issues:

Firstly, I am struggling to identify line breaks within the text. While I can hardcode text with line breaks, when a user clicks on "Edit," it displays "
" in the text and if they save it, only "
" appears as plain text.

Secondly, if the user deletes all the text and tries to save it, it doesn't work and simply prints "