Skip to content
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

[Feature Request]: Right click to copy link #22

Closed
CalebJohn opened this issue Sep 29, 2021 · 2 comments
Closed

[Feature Request]: Right click to copy link #22

CalebJohn opened this issue Sep 29, 2021 · 2 comments

Comments

@CalebJohn
Copy link
Owner

requested on the forum

This is something I'd like to support, and would accept a PR for. The only issue I can foresee is that I'm not sure if there is a good way to dynamically change the context menu based on what's being clicked.

What would be nice is the ability for a plugin developer to provide a function that gets applied to the text under the cursor which would determine if the menu item appears or not. I think similar functionality is already available and could maybe be extended for this use.

@laurent22
Copy link
Contributor

I had actually started making some changes towards this, because I wanted to add support for saving an image from the editor, but didn't go very far.

I think the current approach for context menu is not ideal. Instead of declaring in advance the menu, the app should call some function in the plugin, and the menu could be built at that point. With that method the plugin can display different menus depending on the context.

If I remember well the tricky part was to change some sync calls to async in the app, so that it's possible to call the plugin and wait for the result.

@CalebJohn
Copy link
Owner Author

Fixed in #30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants