[英]Electron: Open With Context Menu
I haven't worked with either of these options but they seem viable: 我没有使用以下任何一个选项,但它们似乎可行:
Native Electron: menu.popup(options) 本机电子: menu.popup(options)
You might try adding this to your electron-builder-config.json
: 您可以尝试将其添加到
electron-builder-config.json
:
"fileAssociations": [
{
"ext": ["txt", "md", "yml"],
"name": "Plain Text",
"role": "Editor"
}
],
From https://github.com/rchrd2/example-electron-file-association 来自https://github.com/rchrd2/example-electron-file-association
See also: https://www.electron.build/configuration/configuration#PlatformSpecificBuildOptions-fileAssociations 另请参阅: https : //www.electron.build/configuration/configuration#PlatformSpecificBuildOptions-fileAssociations
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.