Desktop: Native "Open with" dialog for opening resources from a note

When right-clicking a resource link it would be great to have another context menu item “Open with”, which opens the native dialog for choosing the external application from available ones.

Some context when users might use it:
I frequently add pdf resources to my notes, and use Xournal for adding hand-written annotations on them. However, I do not want to set my system’s default application for pdfs as Xournal, since there are better applications for reading them.
I believe that other users might find it useful in similar circumstances too, potentially with image or pdf resource files.

After a brief look into the electron API I couldn’t find a function to do this. So here are some alternative options that could be taken:

  1. Scan system applications and build our own open-with dialog. This might be too much for a relatively infrequently used feature.
  2. Next to “Copy path to clipboard” context item, add another “Open containing folder”, which would open the containing folder and select the resource item. The user could then use the system’s default file manager’s context menu and open the file with whatever application he wants. Electron has an existing function shell.showItemInFolder, which does exactly that.
  3. Add another Joplin setting that allows users to specify default applications any file types for the “Open” action.

Thanks for the suggestion, this is a great starting point should you or someone else go to work on this problem. unfortunately there is another hiccup, Joplin currently doesn’t sync changes to resources, this means that even if you had the file open in xournal, editing it wouldn’t be of any help. This is a current weakness of Joplin’s, which I think will be solved eventually (I’ve tried before but it is a complex problem)

That’s a good point, thanks. Just a minor correction - you can edit a file on a single device and the changes persist, it’s just that the changes will not be synced to the other devices. I do that on my desktop, as explained with Xournal.
I suppose the feature mentioned in this topic could still be added regardless of the syncing issue, which could be solved later.

Yes that’s true, thanks for pointing it out.