This functionality is already supported. Just turn “Strict Line Breaks” (in Settings > Editor) ON.
Settings > Editor