licht1stein / obsidian.el

Obsidian Notes for Emacs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Preview inline images with wikilinks

namdnguyen opened this issue · comments

emacs's markdown-mode can display images when the function markdown-toggle-inline-images is run. This only works for images that use the markdown image format, but not the wikilink format that Obsidian may use.

This would be a nice feature to add to make working with Obsidian notes in emacs even nicer.

Hi, @namdnguyen
Sounds like a neat feature to have. Do you have an idea of how to implement it?

Hey @licht1stein, maybe obsidian.el could port the markdown-display-inline-images function from markdown-mode.el to work with the Obsidian link parsing functions that you created to jump to file from a link?

The markdown-mode function supports retrieving remote images via a URL as well as locally. For local files, it looks like it assumes that the image is in the root of the default directory if no absolute file path is given, which is not the default case for Obsidian. My images are saved to the subdirectory attachments.

What do you think?

Doesn't sound too difficult, I'll take a look :)