![[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.

21 Likes

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

2 Likes

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.

2 Likes

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.

2 Likes

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]]

2 Likes

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.