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:
- Scan system applications and build our own open-with dialog. This might be too much for a relatively infrequently used feature.
- 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. - Add another Joplin setting that allows users to specify default applications any file types for the “Open” action.