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

Add new context menu items #30

Merged
merged 5 commits into from
Jan 15, 2022
Merged

Conversation

laurent22
Copy link
Contributor

@laurent22 laurent22 commented Dec 27, 2021

This pull request implements the change that was discussed there and makes use of the new joplin.workspace.filterEditorContextMenu which allows dynamically setting items depending on the context. Using this and other new plugin APIs I've added the same menu items as in the preview - "Open link", "Reveal in folder" and "Copy path to clipboard" when right clicking on a resource.

I've also added "Toggle checkbox" for checkboxes.

The plugin requires the desktop app v2.7, which is not yet released!

I had to refactor the code a bit in ClickHandler to allow retrieving the type of content under the cursor. I think the code is equivalent but let me know if you prefer to do this differently.

Actual changes start here (the rest is just an update to the plugin API)

src/index.ts Outdated Show resolved Hide resolved
@CalebJohn
Copy link
Owner

Thanks for the changes @laurent22! This is really cool, I saw the commits updating the plugin API for this the other day and I started scheming to add this myself. It's nice of you to beat me to it!

I'm going to wait for 2.7 before merging this. I don't plan on making any changes to the plugin before then, so there shouldn't be any merge conflicts with this branch.

@CalebJohn CalebJohn merged commit 06f63f6 into CalebJohn:main Jan 15, 2022
@CalebJohn
Copy link
Owner

Thanks again @laurent22!

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

Successfully merging this pull request may close these issues.

None yet

2 participants