Support multi line breaks like Typora

Continuing the discussion from How to add multi line breaks in preview mode:


I take lots of notes using Obsidian with Preview Mode. To make things look neat, I add…

  • <br> between header2s,
  • <br><br> (or more) between header1s,
  • ENTER after code blocks and callouts,
  • ENTER after quotation,
  • ENTER etc.

Too lazy to add <br>s everywhere I need them. Sticking to Live Preview.

Everything looks just fine in Live Preview, but once I toggle to reading view the line breaks messes up. The ENTER line breaks doesn’t show up (as expected), and my note appears to be one big chunk. Exported files also lack ENTER line breaks.

Current Workaround

Some <br>s, &emsp;s, and patience.

Proposed Solution

Is it possible to add an option in settings to support multiple line breaks using consecutive "SPACE SPACE ENTER"s (like Typora), or even ENTER ENTER, if strict line breaks is turned off?

Please don’t let it remain a feature :pleading_face:

It sounds like you always want the same spacing in various places (2 blanks lines after h1, etc). The way to do it is by adding margin with a CSS snippet (as suggested late in the thread that you linked). Then, no matter what you type, the spacing will be correct in Reading view.

I never use reading mode for that reason.
Spatial separation between blocks helps helps to remember and distinguish different parts of the text.
[EDIT: I use different amount of spacing depending on relatedness]

In reading mode it’s all smashed together, looks different and I lose my spatial overview.

[EDIT 2: I found a great workaround, written up here: How to add multi line breaks in preview mode - #13 by chrsle]

How many breaks I do depends on relativity. I usually also want new lines before and after bullet lists “headers”, which can’t be worked around with CSS. There are definitely work arounds for this characteristic but none of it actually comes in handy compared to SPACE SPACE ENTER or ENTER.

:astonished: Sounds amazing! Thanks!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.