Allow internal links to HTML and other file formats

When you copy a PDF file to the vault, you can create a link to that file and display it inside Obsidian, using the [[filename.pdf]] or [pdf](filename.pdf) syntax. You can also embed and link to image file formats. This is very useful. Unfortunately, this currently only works with PDF and image files.

I suggest that Obsidian allows to do the same with other file formats, most importantly HTML. Currently, if you use the notation [[filename.html]] or [html](filename.html), then this does not work. Instead of showing the HTML file, Obsidian creates an empty filename.html.md file and opens that.

As a workaround you could use the [html](file:///path/filename.html) notation, but this only allows absolute file paths. This not only makes the links uglier and longer, and you must be careful with space characters in file names etc., but most of all, if you move the vault, these links will break. So this is not a viable replacement for an internal link.

And using an HTML link like <a href="filename.html">html</a> would be even uglier and does not work either anyway.

Some use cases:

  • I have converted my Evernote notes to an Obsidian vault. In addition to a Markdown conversion of every note, I also keep the original note with the original formatting as HTML in the attachments folder of the same vault. I would like to link from the Markdown note to its Evernote original in HTML format, using the notation mentioned above.
  • In order to fully replace a tool like Evernote, it should be possible to save snapshots of Internet pages in Obsidian. Usually it is sufficient to keep a Markdown conversion of Internet content. But sometimes when you have more complicated formatting and layout, you want to keep the original HTML. In these cases, you can save the page e.g. with the SingleFile Firefox add-on as HTML, and store this snapshot as part of the Obisidian vault inside the attachments folder. But then you need to have a way to link to this page.
  • Some parts of your knowledge base are best stored as spreadsheets. It would be great if you could link to or embed to such spreadsheets in the attachment folder. Embedding spreadsheets is one of the useful features in OneNote - it would be great if Obsidian would at least have rudimentary support for linking to spreadsheets that are part of the vault.

A post was merged into an existing topic: Insert/Embed other file formats like .xlsx and .docx (but not limited to) in addition to pdf and images