title: How to detect key pressed in Javascript inside textarea input?
body: <p>I am trying to create a simple Javascript text editor that only makes paragraph breaks to entered paragraphs inside textarea input. while saving textarea input value in database they strip out the paragraph breaks and I also don't want to use all other present text editors because I only need the paragraph breaking (br tag) to be placed while hit <kbd>enter</kbd> key and should be saved like that with the tag inside the database. I could not find the solution by Googling.</p>