javalent / admonitions

Adds admonition block-styled content to Obsidian.md
MIT License
1.09k stars 71 forks source link

admonition embeds don't work from inside dataview view.js #112

Closed vitaly closed 2 years ago

vitaly commented 3 years ago

not sure if problem with dataview or admonition. the following code works when running from dataview codeblock, but when running from dataview js, it doesn't create an embed, just prints 'test.png' instead:

dv.app.plugins.plugins["obsidian-admonition"].postprocessor(
  "note",
  "![[test.png]]",
  dv.container.createDiv()
);
valentine195 commented 2 years ago

This is because Dataview runs their post processor asynchronously, I believe. Embeds must be synchronous.