![[abc.html]] Should Render Html Content like <iframe> / Embed local HTML file

Use case or problem

![[abc.html]] Should Render Html Content like in <iframe>.

Why?

  1. While <iframes> works fine, <iframes> has issues with finding html files in Obsidian vaults. See attempts here: Allow to open local file - #55 by Yummy
  2. Because ![[abc.html]] is called an “embedding” and the html content should thus be rendered as is expected of an “embedding”

Proposed solution

Renderer logic:

  • Retrieve path of file in ![[abc.html]]. (This is already done in Obsidian and works fine)
  • Insert path of file p in <iframe src=p></iframe>. Insert this at the position where ![[abc.html]] should be rendered.
  • Done.

Current workaround (optional)

None/non-scalable workarounds. See attempts linked above.

Hi,

I also need this to be fixed. Is Obsidian dev team working/considering this? A year has passed and I see no sign about it.

Just to know if I can expect it to be fixed or not.

Tx

Adding my support for this feature.

I am also looking for this.

Obsidian is an offline tool and I want to be able to integrate with local html-files.

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.

This is not impossible, however it is a security risk (the iframed page could contain malicious code)

Use case or problem

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.

Related feature requests (optional)

Install surfing. and reboot obsidian.

embed html like markdown.

![[xxxx.html]]

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.

Risk? Why is there a risk in self-saved HTML? We obviously wouldn’t save them if there was any risk!

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.