obsidian-api icon indicating copy to clipboard operation
obsidian-api copied to clipboard

Can plugins add new file extension handlers?

Open sh-l opened this issue 3 years ago • 1 comments

My use case is to link/open .djvu files in vaults.

Current status:

  • .djvu files do not show up in internal link suggestions (those shown while you are typing [[ and some words)
  • Such internal links cannot be opened in a new pane. "Open in default app" works though.

To support above use cases, would it be possible for a plugin to declare that files with certain extensions should show up in link suggestions, and customize how such files would be rendered? For .djvu, it seems that djvu.js is a possibility.

sh-l avatar Jan 13 '22 03:01 sh-l

I'm assuming you're using the registerExtensions and registerView APIs to hook up your extension.

  1. is a known issue, the link suggestion currently does not take into account dynamically registered ones yet.
  2. I'm not too sure about.

lishid avatar Jan 24 '22 18:01 lishid

These should be already addressed a while back.

lishid avatar Sep 23 '22 00:09 lishid