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

allow copying to clipboard instead of saving as a file #9

Open
luisrudge opened this issue Feb 16, 2018 · 17 comments
Open

allow copying to clipboard instead of saving as a file #9

luisrudge opened this issue Feb 16, 2018 · 17 comments
Labels
feature New feature or request upstream

Comments

@luisrudge
Copy link

No description provided.

@ericcirone
Copy link

Just tried out Polacode and while it is cool, this was my immediate thought as well.

@nodeful
Copy link

nodeful commented Feb 16, 2018

Absolutely, a must have functionality!

@octref octref added the feature New feature or request label Feb 16, 2018
@octref
Copy link
Owner

octref commented Feb 16, 2018

Yep, had it in mind but didn't make it for MVP.

@octref
Copy link
Owner

octref commented Feb 18, 2018

This seems impossible with the current API. The Electron webview can't do it per this Chromium Bug. On macOS, pbcopy does not take image input. Electron does have an API but VS Code does not expose it.

I'm asking for it: microsoft/vscode#217 (comment)

@seveves
Copy link

seveves commented Feb 19, 2018

@octref I tried to implement it this with the electron nativeImage + clipboard modules but can't get it running. I think we have to wait for Microsoft to expose the clipboard API via vscode.

@runofthemillgeek
Copy link

I don't think this solves this issue but can we have like a toggle to preview the image and right-click that and have Chrome's copy image functionality? Is that possible in VS Code right now? I checked the image previewer in Code but that doesn't allow me to copy the image being previewed.

@kamranayub
Copy link

kamranayub commented Feb 21, 2018

Random thought: has anyone tried using Canvas?

From image, use drawImage.

In Chrome, right-clicking canvas allows you to copy image.

@runofthemillgeek
Copy link

@kamranayub On the same lines as I was wondering which I posted above but right-clicking doesn't seem to popup any context menus inside VS Code.

@maple3142
Copy link

I implemented it by spawn another electron process in vscode...
At least it can work. 😅
https://github.com/maple3142/polacode

@travisbaratcart
Copy link

+1, I want to use this extension to copy paste code into emails. I'm not going to go through saving a file and importing for that.

@adi518
Copy link

adi518 commented May 16, 2019

Someone made a fork that fixes a bunch of things, so I'd use that for the time being.

@duartealexf
Copy link

duplicate of #70? I'd really like this feature too!

@kufii
Copy link
Contributor

kufii commented Nov 27, 2019

I created an npm library for copying images to clipboard that you're free to use:

https://www.npmjs.com/package/img-clipboard

@JounQin
Copy link

JounQin commented Dec 18, 2019

This is definitely cool feature, will raise an PR for it when I'm not so busy.

@GalDayan
Copy link

GalDayan commented May 8, 2020

Awesome feature, very useful

@MathBunny
Copy link

Hi, any updates on this?

@mreduar
Copy link

mreduar commented Aug 28, 2021

I found an extension that already implements this very useful feature.
https://marketplace.visualstudio.com/items?itemName=adpyke.codesnap

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

No branches or pull requests