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?
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.
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?
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.
That is exactly what I was looking for.
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?
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.
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
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.)