Closed StefanoRausch closed 1 year ago
this can be easily done using the yaml because I patched the file object
---
bar: "foo"
---
%% run start file.properties.bar %%
I should update the doc.
If I am not mistaken one cannot add:
const modal = app.plugins.plugins.modalforms.api
const obs = await self.require.import("[[user.script.obsidian.delay-until-synced.mjs]]")
// ...
to the frontmatter and use it in a JavaScript
code block.
Edit: Even putting a Templater
execution commands
block before the frontmatter and referencing the variables in the YAML section does not pan out.
OK but this seems like another issue... Can you open another feature request or bug report? Let's make it as descriptive as possible so that I know what exactly you want to do.
Variables are scoped to the
run
block they are defined in and cannot be used in otherblocks
on the same page.The usability of the plugin can be enhanced even further if the scoping of variables is extended to the page level. That would allow users to define variables in one block for re-use in any other (following) blocks.