How do I embed notes without the title

Hi :slight_smile:

I would like to be able to embed the content of note A somewhere in note B.

How is that possible?

Without embedding the title I can actually reuse my content in different contexts.

As I can read the documentation I can only:

  • embed a single block from note A into note B
  • embed note A (title + text) into note B

or have I missed something?

Regards

Henrik

14 Likes

I was able to figure out a workaround! A link can point at a heading ![[note#head]] or at a block through a pointer that Obsidian generates ![[note#^index]]. In this case, it does not show the title.

If you just write ![[note#]] it displays the whole note without the title.

I suppose it tries to link a part of the note and displays it in its entirety when it fails to find a specific part. It works with anything after the # symbol that the app fails to find inside the note.
I don’t know if that is intended behavior and if it will be changed later, but I think it’s a good use-case and should be left as-is.

3 Likes

I tried this on Windows version 0.12.3 and they don’t work any more.

  • For headings: Unable to find section # in documentName
  • For block IDs: "documentName^" is not created yet. Click to create.

Sorry for necromancing the thread but it was the first search result.
Has anyone found a better approach since February or should I get good at CSS and hide it this way? :smiley:

3 Likes

Unclear to me what the OP means. For me, content includes titles (if any present in content of Note A).

Should he mean “just leave out the extra (file name) title”, this can be achieved, for instance, by using my “Clean Embeds” or “Clean Embeds All” CSS snippets.

If unsure, check out the explanatory video to see what it will do.

16 Likes

That is exactly what I was looking for.
Thank you.

Hi @Moonbase59, is it possible to fold embeds like the way we fold headers ?

Hey @Walrux, not with my clean-embeds CSS series. They were made to make a long document look like one, and for “note reuse”, i.e. to avoid redundancy.

But maybe one of the CSS magicians around here wants to tackle that one? :wink:

Hi. I had a similar issue. A work-around I stumbled on may work for you. I am new to obsidian and the entire markdown thing and have no experience with writing code or css. So this solution is crude, I suppose, but it works for me. In searching for a solution to my issue, I stumbled upon this information in the obsidian help pages that you can “comment out” sections of your text by putting them between double %% thus: %%this text is commented out%%. Such sections do not show up in preview mode. So now I comment out headings and other text elements that I do not want to show up in my embeds and when I preview the document in which I embedded them, I have a clean document with only the content element of the embedded notes. It has worked for me so far. It might for you or others. I guess, though, that one ultimately has little choice but to invest some time in learning some coding and css to get the full benefit of markdown.

Hi Moonbase59 and thank you for the stylesheet!
I had to remove ".markdown-preview-view " from the entire document to make it work. Just letting you know if you’ll decide to update it.
Best regards

4 Likes

Thank you!! I’d been using clean-embeds-all for a while but maybe a newer update changed something, so removing what you said worked, thanks :slight_smile:

Thanks, I’ve been using clean-embeds successfully here for some time now! But do you know how to change it so “exporting to PDF” also hides the embedded notes’ titles?

This tweak worked for me. Thanks so much! (And thanks to @Moonbase59 for the original stylesheet.)

Somtimes I want a title (if it’s a short article that I’m embedded into research) and sometimes I don’t (if I’m embedding a quote somewhere). CSS seems like having to pick one.

If you embed a section, like for a quote,
then no header should be inserted.

And when using CSS you can decide to have the title removal in a snippet (or class) of its own. That would allow for the addition of that class either through cssClass or some of the class adder plugins. This would allow for removal of titles on at least a per file basis, or possible (using the plugins) related to that particular embed.

So options do exist…

Hi. I tried the CSS route but it didn’t seem to work (for me) and it’s not something I find particularly intuitive. I’d really love this to be a core feature.