Shared by Ashkan
Add an empty line at the cursor
var lineBreak="<br><br>"; editor.replaceSelection(lineBreak);