Make consecutive embeds in Reading view appear same as in Live Preview?

I just love how Live Preview (on the left) handles consecutive embeds–those not separated by an empty line appear as a single continuous embed, which makes it supremely useful for embedding consecutive blocks from other notes, especially list items!

Dec-19-2024 01-25-37

What’s great is that not all consecutive embeds have to turn into one big super-embed. I’m given choice: simply insert a blank line between two embedded links and voilà–they are now separated.

What I don’t love is how Reading view (below) robs me of such wonderful and desirable behavior and chops up my lovely super-embeds :roll_eyes:

In Reading view, I want consecutive block embed to appear exactly the same as in Live Preview. Is this possible? :pray:

A solution that would simply remove the gap between all consecutive emebds would not suffice–I need it where inserting a blank line between two embeds separates them while having no empty line between merges them.

I only tested it out quickly, but you could give this a try:

.markdown-preview-view .inline-embed + br {
    display: none;
}

Obsidian_Jlv1TLgNrK

source | live preview | reading view

1 Like

Looks like that did it! This made my day, thank you so much! :hugs:

Sadly, The Minimal Theme breaks your solution, which works great with the default theme. Any idea how to reconcile it with Minimal? :thinking:

Side-note: how’d you get the LP icon in the tab title bar? Looks real useful!

I’d have a look what is happening in Minimal using the inspector.

1 Like

Cracked it! To merge consecutive embeds in the Minimal Theme:

.markdown-preview-view .markdown-embed {
  margin: 0;
}

.markdown-preview-view .inline-embed + br {
  display: none;
}

Ah, this makes me unreasonably happy!