Block Reference for multiple paragraph

Actually, as I was trying to construct a new thread to catch this use-case, I found out that it already works as you describe. The text you pasted is in a note on the left. A test note in Edit mode is on the top-right, showing the embedded block from the raw text. That note is Previewed in the bottom-right:

Thank you very much for this discussion! It seems that you are right again in my particular example, sorry about that! I should have checked that in advance.

But, as you can see in the screenshot below, this seems to not always be the case.

The autocomplete menu shows three different blocks.
Why could that be? I am not really sure what the rules are anymore.

Thanks again!

I am looking for exactly what OP requested. Any solution since October?

2 Likes

Yes, this feature would be great also for referencing blocks of paragraphs while keeping blank lines between them. For example, my current use case is to have templates for emails and I would like to compose different ones depending on the recipient. I don’t want a paragraph without blank lines, because I want to copy an email template ready to paste directly instead of adding each blank line.

But it could also be useful to have quickly readable composed notes.

Is there a solution for this?

Yes: use heading links.

Mmm, I think it is not enough. With alias I can’t change the real header if I make a ![[]]. I only can change how the link [[]] is visualized, but not the content if I make ![[]].

Sorry, I don’t follow. Do you have an example?

I hope there is no error. Read Summary to understand.

Thanks for putting that together. It is still a little hard to follow, but I think I understand.

You want to include two or more blocks in one embed without showing a header. This is possible: hide the header from your embeds via a CSS snippet. See Theme: Obsdn-Dark-Rmx (now with Light & Dark) - updated 2020-09-11 - #9 by Klaas.

As for the second challenge, it’s true that the heading solution requires adding arbitrary headings to groups of blocks. I think you could create a “fake” header using e.g., H6s (######) that you hide in preview with CSS (e.g., h6 { display: none } as a workaround. Otherwise, you will have to wait until if-and-when this feature request is implemented.

2 Likes

@ryanjamurphy, having just searched for a solution to my problem (wanting to embed multiple blocks but not show a heading) I will try your work around for now.
Is there a feature request for manual defining of blocks that I can vote on? Thanks.

2 Likes

This is it!

4 Likes

Hi,

I totally support this feature request. The best would be the possibility to create nested and entrelaced blocks. For exemple, using the author suggestion :slight_smile:

::: Block1
Line 1
::: Block2
Line 2
::: !Block1
Line 3
::: !Block2
Line 4

The result of

[[NoteName^Block1]]

Would be

Line 1
Line 2

And the result of

[[NoteName^Block1]]

Would be

Line 2
Line 3

Titles are not really aimed to create blocks. It’s interesting to have the ability to reference a title, but it can’t be considered as a block functionnality.

As proposed by the author, it could be possible to create a specific css class for the block, it could be interesting to share some style between notes.

I know there is a lot of feature to implement in Obsidian, and this one will be usefull for a small amount of people. But some people, like me, are really in need for this functionality.

:slight_smile:

2 Likes

Just an edit, I’m sorry…

On the referenced note, it should appear only one backlink. It’s impossible to do actually, we can’t use > nor titles because of the entrelaced blocks. We have to reference line by line the document. It’s a pain, it’s hard to maintain and it creates a lot of backlinks.

As proposed by the author, it could be possible to create a specific css class for the block, it could be interesting to share some style between notes. Obviously, for entrelaced blocks it should be tested, but it’s possible to add the classes and priority.

1 Like

I 100% support for referencing multi blocks with a specific css class as @Showb said.

Sharing reference from notes to notes can be amazing. A simple but strong use case of it would be making resume. We might have various working as well as education experiences. We can spilt them into seperated markdown files. Now creating a targeted resume would be a few bunch of referencing.

I’m now refering them paragraph by paragraph, and then changing the refering style in resume. But there are some lines you would always refer(working duration, age, name, company name, etc), I wish there could be a customed block syntax/css class to wrap these blocks(lines), so I only need to refer them once.

Thank you!

By the way, if this is too complicated to implement, would it be better to choose a range for refering? For example, I got 4 blocks below to refer now, would it be possible to use something like [[notename#(^aaa,^bbb)]]?

Paragraph 1  
^aaa
Paragraph 2

Paragraph 3  

Paragraph 4  
^bbb

1 Like

I’m also in support of this feature, I specifically stumbled onto this thread trying to embed a list without having the random heading in the middle of my text as I would have to do it now.

I am particularly partial to OP’s second solution since it also provides the ability for nesting (as @Showb suggested) while still conforming to existing syntax, so with

Line 1
^aaa
Line 2
Line 3
Line 4

^aaa could continue to reference Line 1 while with

Line 1
^aaa
Line 2
^bbb
Line 3
^aaa
Line 4
^bbb

^aaa would reference

Line 2
Line 3

and ^bbb could simultaneously reference

Line 3
Line 4

I’d consider @CoreJa’s solution equally good, so for me it’d come down to which is easier to implement or which has the least edge-cases.

I don’t really have the time to implement this as a plugin atm, but I might if I find some. If someone else would care to do it, I’d be happy to contribute!

1 Like

Newbie comment. Working myself away from Notion where you can define arbitrary sections of a note to embed elsewhere. Seems to me a “top fence” for a named block would make total sense as a manual override to the automatic logic. For example

^GroupBlockName
These are some

elements I want to embed elsewhere
regardless of formatting
^GroupBlockName

Change the delimiter on top fence however you like, but the functionality of a manual declaration is missing IMO.

1 Like

Hi all!

I see the use of header-references, but I would also VERY much like to see custom block-references. Maybe, as @GregMon said, by using a top-bottom-fence syntax, or by being able to use the same block-reference name for multiple blocks, which then joins them upon referencing.

My specific use-case is as follows:

  1. I like to separate sections with a line (“—”), but I don’t want it to appear at the bottom of a embedded reference created for the previous header. This way I could exclude it.
  2. I want to be able to embed specific blockS within a header, without having to create a separate header for those blocks.

Could this feature be reconsidered?

In the meantime, do you have a solution to my 1st use-case?

Cheers
ABKane

I like to see a solution to this problem too, still using headings for referencing multiple lines and it is a very ugly and high friction workflow for me.

2 Likes

I would definitely use a functionality like @GregMon described. I have notes that are long texts separated into chapters and paragraphs, and I reference these notes in many other places. Most of the time, I don’t want to link the entire chapter OR a single paragraph, I want to link a 2-6 paragraph section of the chapter. Having to create hidden headings or separate notes to define the specific blocks I want is very time consuming and clunky.

Late to the conversation, but I just wanted to note that you can embed multiple blocks if they’re included in the same callout. I find this useful in a lot of cases, but it’s not going to work everywhere.