obsidian-dataview
obsidian-dataview copied to clipboard
Add code block in setting that executes before each dataviewjs execution.
I often use dataviewjs blocks along with some js scripts of mine that I store in my vault in 'utils' folder. And each time I want to use some of the functions defined there - I have to import them, which makes my blocks look like that:
```dataviewjs
let path = app.vault.adapter.basePath + "\\utils.js"
var {prevAndNextNoteNav} = require(path);
prevAndNextNoteNav(dv, "<< {0} | {1} | {2} >>")
I would like to have an option to define js code that will execute before each dataviewjs block execution. Some kind of pre-exec block in settings, maybe. So that I can move those first two import lines to settings and have only my function execution in a note.
As an afterthought, maybe, post-exec block also would become benefitial to dataview users 🤔