How to make preview mode look like editing view (no extra margins, keep line breaks)

I usually make notes on my mobile and sometimes read them there too. On mobile, I really like the compact layout in editing view, because it respects the line breaks I add with a single enter.

However, in reading/preview mode, I don’t like that:

  • Extra margins are added, and
  • The line breaks from single enter are ignored.

What I want is for my preview mode to look just like editing view: no extra margins, and line breaks should be respected.

I’m still a beginner and have already tried using GPT for 4 days, but couldn’t find a solution. That’s why I created this account to ask here. I’d be really grateful if someone could kindly help me fix this.

I don’t have this problem, so:

  • could be theme-related “feature”
    • try with a different theme
  • could be that phone app adds something like char(13) … carriage return and/or char(10) … line feed which than can be rendered only in Preview mode

If I were to see the same problem, I could suggest and provide a CSS snippet solution.

Cheers, Marko :nerd_face:

Respected Sir, I have also attached the screen in the topic. Could you see pls?

I can see the screens, yes, but those just show a problem, not what is causing it. Maybe just plain “copy & paste” text will level something more, but I doubt that. The next step would be to take a print screen of the inspector to see the structural difference between the two modes.

If you can confirm or deny what you see on the computer, it would also eliminate device-related questions. Or, if you could provide the OS, app version, and that basic information, that can help us investigate the problem.

Cheers, Marko :nerd_face:

Sir, I am afraid that I cannot use inspect on mobile but I can provide other information. I am using Tecno Camon Pro Mobile with OS 15.1 and obsidian version 1.9.12.
Morevover, this extra margin issue remains persistant with whatever theme I use. Currently I am using minimal.
Also, I tried some snippets from GPT and either they remove all margin or none.

I want in preview mode:

  • No extra margin by all elements
  • Empty line created by single enter.

If there any snippet to overrite the defualt behaviour it will work., as per my noob understanding