Open files with shell in notepad


#1

Hey,

I want to open a .js file using electron shell but in notepad or any other editor.

function open() {
event.preventDefault();
shell.openExternal('D:\\Path1\\Path2\\Path3\\Path4\\main.js')
};

Can i open js files in notepad with shell and if so how do i do that?


#2

You probably want to use shell.openItem().


#3

With any method electron just gets completely white