This thread exists but unfortunately there is nothing that can help. The security precautions make sense, but it’s not so helpful when you’re writing you’re own notes…
This plugin exists and allows HTML files to achieve what we want. The only issue is that you can’t swap between edit and view mode to edit the file in Obsidian…
A future direction is to look at the code and work out how the ‘unsafe’ method happens and use it within the Markdown notes? Doesn’t seem possible as its opening a new page.
Perhaps this plugin can be used to provide JS across notes ready to be used in dataview or something?