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 support for copying canvas to clipboard #10066

Merged
merged 1 commit into from Aug 12, 2020
Merged

Conversation

mattpap
Copy link
Contributor

@mattpap mattpap commented May 23, 2020

This is a fairly new API, primarily usable in Chromium-based browsers and most recent Safari. Firefox requires dom.events.asyncClipboard.dataTransfer flag to be enabled for it to work. The tool is available from save tool's context menu:

image

If the feature is not available, the menu item will not show (or entire menu if empty).

@mattpap mattpap added this to the next milestone May 23, 2020
@mattpap mattpap changed the base branch from master to branch-2.2 Aug 4, 2020
@bryevdv bryevdv modified the milestones: next, 2.2 Aug 12, 2020
@bryevdv bryevdv merged commit 80c17b1 into branch-2.2 Aug 12, 2020
@bryevdv bryevdv deleted the mattpap/clipboard branch Aug 12, 2020
@adamwarlock
Copy link

adamwarlock commented Jan 6, 2021

Is it possible to get the copy to clipboard tool out of save tool's context menu as a separate tool ?

@bryevdv
Copy link
Member

bryevdv commented Jan 7, 2021

It's a non-trivial amount of overhead to add a new model, so unless there is alot of interest expressed from the community, I'd say its unlikely, especially since it is possible to add a CustomAction to the toolbar that executes JS code you provide (that could do the clipboard copy, e.g.)

https://docs.bokeh.org/en/latest/docs/reference/models/tools.html?highlight=customaction#bokeh.models.tools.CustomAction

@adamwarlock
Copy link

adamwarlock commented Jan 7, 2021

Can i display the icon for copy to clipboard tool next to save tool's icon or outside of the save tool's context menu?

@bryevdv
Copy link
Member

bryevdv commented Jan 7, 2021

@adamwarlock as this is now veered into support question territory, please move the discussion to the community discourse:

https://discourse.bokeh.org

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

Successfully merging this pull request may close these issues.

None yet

3 participants