Is there any way to control the new LivePreview with CSS?

Why this might not be a good idea.
I came upon this thread with the same complaint in mind. I don’t like the way a single line break makes it difficult to distinguish paragraphs in Obsidian, especially for long-form writing. I’m not accustomed to entering double line breaks after paragraphs and it also doesn’t look right. So as I searched for a way to add paragraph spacing I eventually landed here, through a string of interesting discussions started by aluminumbird.
I noticed that DorVIP warns that changing the CSS properties so that a paragraph is treated as a line “could cause problems down the line.” And I was curious what they meant, so I did some experimenting. First, I loaded up the CSS snipped and opened Obsidian with the snippet applied. Then I found a long article and copied and pasted it into MS, just to take a look. There were line endings at the ends of paragraphs which I expected. However, since the markdown code would have to be eliminated to use in word, I ran it through a standard online markdown converter to html. When I pasted it back into MS, the line endings were stripped and the paragraphs ran together, which would be a real headache in a long piece of text.
Therefore, if I want to get text out of Obsidian to format in another program, which is highly likely,it appears that a snippet which makes text within Obsidian look “right” might actually be of detriment once the text is converted to another format like .doc, .rtf, html etc. Maybe someone else knows how to get around this, but for the moment I’ve changed my mind about using the snippet in Obsidian for my long texts.
I haven’t tested it with the Longform plugin, or Pandoc, which may handle the conversion differently. I wonder if anyone has figured out how to achieve what we all want in a way we can export and edit easily?

This is the code I used to test
:
.cm-s-obsidian .CodeMirror-line,
.cm-s-obsidian .cm-line {
    padding-bottom: 10px ;
    padding-top: 10px ;
}
2 Likes