I am also looking for this.
I want to be able to make interactive plots using python and plotly. I would save the plots as .html files and then be able to embed them into a note.
I have been searching high and low for a workaround and cannot find anything. It works using absolute file paths, but this is untenable as I often switch between devices (desktop & mobile). Relative links would solve this entirely.
I have a bunch of interactive plotly plots saved to my obsidian vault. I want to display these embedded in my markdown files.
Proposed solution
Currently the plots can be viewed using HTML reader but they are not supported for embedding into markdown. Adding html as an accepted file format would solve this problem.
Current workaround (optional)
I can still see the interactive plots with obsidian reader when clicking on the html files so I just view them in a separate window. iframe used to worked but no longer.
Thanks @KuiyueRO; although this doesn’t work on mobile (or iOS at least, for me), and understandably there is a security concern associated with this, being able to embed local html files within markdown would be such a huge benefit.
I don’t get how this can be considered as a security risk while it’s actually an Obsidian feature. Why locally saved pages are considered more dangerous than random page from internet?
I also would like to be able to embed local htmls into my notes as I have numerous archived web pages with useful information that I’d like to refer from my notes.
Interactive, custom-built HTML files are a great way to visualize data and concepts, e.g. graphs of mathematical functions/statistical distributions with sliders.
Currently, if you try to embed a local HTML file containing JavaScript into a note, Obsidian understandably strips the <script> tags for security reasons. This results in a blank or broken embed, severely limiting the ability to incorporate custom interactive tools directly alongside our notes.
Proposed solution
I would love to see native support for embedding local .html files, e.g. using the standard wikilink syntax: ![[interactive_graphic.html]]
To ensure vault security and prevent malicious scripts from accessing local files or Obsidian’s API, the embedded HTML could be automatically rendered inside a sandboxed iframe (e.g., <iframe sandbox="allow-scripts">). This would allow the self-contained JavaScript within the HTML file to run and render the visual (like a <canvas> element), while completely walling it off from the rest of the application and the local file system.
Current workaround
Currently, there are community plugins like Embed HTML by mnaoumov that implement exactly this feature, but it is kind of instable, does not work on the phone and of course can be stopped to be maintained at any point.