Embed interactive html-files

Use case or problem

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.

A post was merged into an existing topic: ![[abc.html]] Should Render Html Content like