How to make a dataview attribute with multiple paragraphs

Hi hi.

I’m trying to create a section with multiple paragraphs in my note, and I want the entire section to be wrapped in a dataview attribute so that I can show it in lists / tables elsewhere.

For example:
(Summary:: Dave ate a hotdog.

Then later that day, the hotdog’s family found him.)

Is this possible at all? It seems an inline attribute has to be a single paragraph, any attempt add a newline seems to break the attribute.

Unfortunately I have no idea how to do what you’re asking for (maybe someone else does, but I think it might be hard in dataview!) so I am going to suggest a couple work-arounds. They both rely on your “Summary” being under some heading, doesn’t mater what level of #####.

  1. If your “Summary” section is always under the same heading, you could use embed links e.g. ![[<noteFileName>#HeadingThatHasSummary]] or an embedded search query for that heading. Pinging @CawlinTeffid for embedded search expertise.

  2. If you really want to do this in dataview, I think you could do something similar by making a field with the link to the summary heading and then embedding the link in your list/table. The field doesn’t have to be in the summary section itself.

Maybe others will have more creative solutions?

1 Like

Multiple paragraphs exceed the limits of “inline” because they span more than 1 line — it’s in the name. :slightly_smiling_face:

You can use multi-line attributes in YAML metadata if DataView doesn’t disallow it (I don’t remember the syntax, but you can look it up).

If you use an embed, I think an @scholarInTraining’s suggestion of an embedded section makes the most sense. If you want the list to omit blank entries, you could do the same thing with an embedded search. If you wanted to embed a search not based on a section, every paragraph would have to have something in common that no other paragraph had, which sounds impractical to me.

1 Like

Ah, unfortunate but makes sense I suppose. I’ll stick to using embedded / linked headings, thanks!

1 Like

You can type <br> in the text to create a line break in a dataview block, but technically the text is still all one line. Not the most elegant but it is a choice I’ve seen several people use when they share their daily log templates.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.