A proposal for rendering block embeds inline

Love this. Please realize it.

2 Likes

Many a times, while writing in Obsidian, I have felt a need to reference a particular block of words in that line. Having this feature would indeed be devine.

However, ā€œhow would this addition play with other things ?ā€ I wonder . And, there is still the fact of block referencing not being a standard feature across PKM mediums. Roam and Obisidan handle block referencing in separate ways. Keeping this in mind, I try to avoid using block referencing as sparsely as possible. Avoid it altogether, if I can.

YES!!.. I do references on bullets all the time and it looks crappy.

3 Likes

+1 for this. I donā€™t use block references much due to the rendering but I would love to use them with the inline rendering proposed above.

3 Likes

@allan:
@smurfman111 's code works like a dream.

Blockquote the [current] implementation makes assumptions about what we want to do with it. Treating them as inline is less speculative about intention, requiring the user to be intentional with the desired results.

Wowā€¦thank you for taking the time to sit down and articulate this so clearly!
I 100% back this idea!

3 Likes

I just wanted to say thank you to @smurfman111 as well. I imported my notes from Roam Research with all of the block references using some custom code. It looked a bit messy with all the new lines but now, it looks perfect!

Shouldnā€™t that CSS snippet just be dropped into the snippets folder and activated? When I do, nothing happens. But this is the first time Iā€™m looking into snippets at all, so I might be missing something.

Or is it theme dependent?

The code works for me. I use default theme.
Edit: As syncretizm replied below, even though the snippet works, thereā€™re still a few problems:

  • The line breaks when you embed block that has another block embedded within it. See here.
  • Too complicated and too hard to customize for the average user.

This snippet works, but I was hoping this could be made into a plugin so itā€™s much easier to do and recommend to others - bonus if it integrates with the Style Settings plugin for more customisation.

3 Likes

incredible! thanks for this, really useful

Hey all, amazing snippet, thank you very much!

Iā€™d like to use it also inside callouts but they seem to treat text differently:


Screenshot from 2022-07-08 19-46-55


Screenshot from 2022-07-08 19-46-56


Any thoughts?
Thank you <3

1 Like

Hi I canā€™t seem to be able to open the page containing the code above, could you share it again?

This is the repo where the code is hosted.

2 Likes

Circling back, admittedly at the Twitter urging of the original poster, because I, too, fully support this idea. Inline block references/transclusion is one of the few major quality-of-life improvements that still exist for a tool that is already so robust and flexible ā€¦

3 Likes

I also would like to see this feature implemented.

2 Likes

+1
I would love to see supercharged block references

2 Likes

+1 (and surprised that this isnā€™t implemented yet)

2 Likes

+1 - I switched from Roam where this functionality is core to the product and it was really great for a lot of uses. It seems to just make sense for Obsidian to implement a similar pattern.

3 Likes

probably because itā€™s not that easy to implement.