Open chaoskcw opened 1 year ago
I can confirm it still dœsn't work in:
Dataview Version 0.5.64
Obsidian Version 1.4.16
OS Windows 11
Here is a test with an image, in the test vault with no other plugin installed (it works with regular DQL, but not in an inline query):
---
img: "[[test.png]]"
---
```dataview
TABLE
embed(link(img)) as Image
WHERE img
= embed(link(this.img))
It dœs the exact same rendering with `img: test.png` instead of `img: "[[test.png]]"`.
Me too. I want to embed daily notes using:
`=embed(link(dateformat(date(today), "yyyy-MM-dd")))`
But it only show the daily notes' filename.
I would like to add to this that even something like ="![[" + "image.png" + "]]"
results in only text being displayed. Or even ="!" + link("image.png")
. Something about the inline queries just makes displaying images literally impossible. For example, using a "lens.png" from my current vault, the html renders in edit mode as:
<div class="cm-line">
<img class="cm-widgetBuffer" aria-hidden="true">
<span contenteditable="false"></span>
<img class="cm-widgetBuffer" aria-hidden="true">
<img class="cm-widgetBuffer" aria-hidden="true">
<span class="dataview dataview-inline" contenteditable="false">
<span>
<span alt="lens.png" src="!Assets/Game Images/Aspects/Things/lens.png" class="internal-embed">lens.png</span>
</span>
</span>
<img class="cm-widgetBuffer" aria-hidden="true">
</div>
And in reading mode as:
<div class="node-insert-event">
<p>
<span class="dataview dataview-inline-query">
<span>
<span alt="lens.png" src="!Assets/Game Images/Aspects/Things/lens.png" class="internal-embed">lens.png</span>
</span>
</span>
</p>
</div>
The cause of this issue seems to be the same as of #1051:
This is because inline queries don't currently use react (which supports inline images) for their rendering; will see if I can get it to work.
Originally posted by @blacksmithgu in https://github.com/blacksmithgu/obsidian-dataview/issues/1051#issuecomment-1112870489
As of today, the example posted by @EdualcLaiv, is working for me.
Obsidian Version: 1.7.4 Dataview Version: 0.5.67 OS: Windows 10
Additionally, given that the img
property is already a link, the following works as well: = embed(this.img)
I confirm, it's working now.
Obsidian Version: 1.7.5 Dataview Version: 0.5.67 OS: Windows 11 (Professionnel) x86_64 — Kernel: WIN32_NT 10.0.22621.4317 (22H2)
What happened?
embed does not work from inline expressions, it returns only plain text and not a link or embedded link
= link(" - Notes")
works= embed(link(" - Notes"))
does not workAlso text manipulation also gets scrubbed to plain text
DQL
= embed(link(" - Notes"))
JS
No response
Dataview Version
0.5.56
Obsidian Version
1.3.7
OS
MacOS