-
-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make it more easily extendable #14
Comments
+1 for this definitely. I find myself wanting to add I think your above syntax is a good approach, something like: require('electron-context-menu')({
prepend: params => [],
append: params => [],
menu: defaults => [
defaults.COPY,
<custom menu item>,
defaults.INSPECT
]
}); and it the |
@callodacity Keep in mind that "Select all" is never in the context menu on macOS or Linux, but rather in the top menubar "Edit" menu. Only on Windows it's in the context menu. I should probably create a built-in for that. The reason this module is opinionated is to ensure users implement items correctly, like this case. |
@sindresorhus "Select All" is in the context menu on macOS when right-clicking inside any textarea or input (try it in the write comments section or the main text input on google). But I definitely agree that keeping it standard is always best. However, think it's important that this module is extendable / customisable too. |
@callodacity That's just Chrome being non-native as usual. Try Safari or any of the builtin macOS apps.
Yup, that's the plan. |
@sindresorhus Good point, I missed that. |
As I mentioned in #43, I've started working on this issue. |
The item itself decides whether or not it should be visible based on the context. |
Is anyone still working on this? I can try implementing it if not. Is there already a consensus on how it would be best solved? |
@sindresorhus Sure 👍🏻 |
The
append
andprepend
options solve most use-cases, but there are still some people that want 100% control. Would be nice to expose a way to build the menu with ready made components, like lego. I'm thinking:Where
x.COPY
is aSymbol
that includes the built-in cut/copy/paste menus. That way it would be easy to add many more built-in menu types users could pick from.The text was updated successfully, but these errors were encountered: