Open a link by external program inside a plugin

Hello,

I would like to add a feature in a Joplin plugin to open a link by external program. For example, if there's a file link, once the user clicks on a button, it will open the file/folder using the operating system's file explorer. Can I do this in a Joplin plugin? (e.g calling Electron's openExternal)

I just thought the plugin system is running in a sandbox which can't access the file I/O.. that is incorrect. I could still use fs / process API. That I could solve it by myself.

Just find the most simple way.

await joplin.commands.execute('openItem', url);
1 Like