A proposal for rendering block embeds inline

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.

This would be a big improvement over the current implementation.

3 Likes

I will note that the strange new worlds plugin does actually implement almost all of this functionality and it exclusively uses data that is already in the cache, so there is little to no performance impact. That plugin seems quite sophisticated so I’m not saying it was easy at all to build. But I think a lot of the groundwork has now been laid and it may not be incredibly challenging to incorporate that code into the native app. Or just expose all the needed functionality through the API to make it easier for plugin developers to expose the data

I use the “strange new worlds” plugin and it’s buggy. As with anything software, the first 80% is the easiest; the last 20% is the hardest. Once “strange new worlds” actually gets out of beta and gets used by many people to iron out edge cases, then it will be worth bringing up to argue how hard or easy it would be for core to implement this stuff.

1 Like

What version are you on? Been updating it almost daily. But yeah, still in its experimental phase but as of recent days very stable.

1 Like

I strongly support the suggestion to enable inline block references.

And I have an additional, related request:
If I’m in an outline and I reference a block from another outline, the bullet point from the referenced block is included so I get two bullet point symbols where the reference is inserted (clumsy formulation, but the screenshot should illustrate it). It would be great to have the possibility to exclude the bullet point in the block reference.

3 Likes