Use case or problem
Obsidian is currently filtering out links with javascript:
as the scheme. I would like to have a link in my note to open the system explorer for an arbitrary folder/file.
Proposed solution
- Add an option under Settings → Editor → Advanced: “Allow javascript: URL scheme in hyperlinks” (with appropriate warnings)
- When option is enabled, the following line should emit HTML with the href attribute in tact:
[Open in Explorer](javascript:app.showInFolder("path/to/file.sh"))
Current workaround (optional)
This can be done using DataView plugin’s dv.el()
to bypass content filtering:
`$=dv.el("a", "Open in Explorer", { href: "javascript:app.showInFolder('path/to/file.sh')" })`
It would be great to be able to do this without the use of a third-party plugin.