blacksmithgu / obsidian-dataview Public
generated from obsidianmd/obsidian-sample-pluginNew issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is is possible to embed the files in the list view ? #177
Comments
|
Added to my backlog of things to do - embed support is almost in, it just looks ugly right now. |
|
I have a similar request regarding building an embed link for blocks: I have a vault with named blocks (eg for project status) and currently build an overview table which transcludes content using embed link syntax (the ! prefix - as described here https://help.obsidian.md/How+to/Link+to+blocks) |
|
+1 for embed support. I'm currently trying to do something like: |
|
I'm limited by the Obsidian API in this case - Obsidian has no API for actually rendering embeds. I can circumvent it with a hack where I manually load the raw Markdown in some cases, though the output is a little wierd and doesn't look like a proper embed. |
|
Noticed that Obsidian renders embeds in a list that the user manually types up. Could a possible workaround in dataview be to let users print to the page? Dataview provides Forgive me if I don't understand "Obsidian has no API for actually rendering embeds". I haven't delved into Obsidian's provisions for plugin developers. |
|
The gist of the issue is that the Obsidian plugin API provides a direct way to render markdown anywhere you want - it's called As for your suggested solution, there isn't a |
This is something I think I could try. Would anyone be familiar with some way of doing this? Also, I was just mulling about this the other day (again forgive me if this idea is crap): since what users see in each page (Preview mode) is javascript, is there some way to copy the javascript from other pages (preview mode) and plonk them into where embeds are to be rendered? |
|
I was able to get the embeds to work. I manually parsed the links as a string with line breaks instead of using |
|
That's... interesting. I need to experiment with this more... |
|
I'm using fileLink's second parameter to embed the file contents: Update: This is tested to be working as of Obsidian v0.13.19 |
|
This sort of works—I see it in a brief preview, but then it quickly reverts back to a simple list view, not sure why. |
|
@blacksmithgu is there any way to access your workaround for rendering the full markdown? on a branch or otherwise? any help here would be appreciated! |
|
It looks like someone made a thread on the Obsidian forum. Our best bet is probably to raise some awareness over there. https://forum.obsidian.md/t/obsidian-plugin-api-does-not-support-rendering-of-embeds/24617/2 |
|
It looks like Obsidian made changes so that plugins can add embeds.
|
|
Indeed, the Obsidian API finally supports embeds. I haven't checked it if "just works" with dataview or if I need to make changes. |
|
So i've been trying this today with an image and it seems to render the image embedding for a few seconds and then just shows the filename... Admittedly new to this plugin (which is great btw), I tried with the following for my image file with the name None of which worked. I thought maybe the image size could be an issue so tried the 200, didn't work. |
|
I've used I use the Homepage plugin to open a specific note on Obsidian start, but on load the Dataview js component shows the filename to be embedded only. Going to another note and then back again will correctly load the embedded content. Not sure if that's an Obsidian or Dataview problem |
|
It looks like it works properly in Live Preview, but embed rendering in the traditional edit/read mode still does not work (i.e., it was never implemented in Obsidian). |
|
Hmm, the support seems a little convoluted - it works via DataviewJS live preview, though not through Dataview queries; I'm guessing you can only create embeds at the top level of the document (i.e., you cannot embed into tables or lists). |
In the List view, I would love to be able to embed the file directly, could this be done ?
I tried with the list view, with concatenation, but it didn't work.
The text was updated successfully, but these errors were encountered: