-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
Clipboard access through Extensions API #4972
Comments
Closing as duplicate of #217. We don't plan to implement that in VS Code but advise to use a node module like https://github.com/xavi-/node-copy-paste. This is to reduce complexity in the VS Code API because otherwise we have to handle/describe all sorts of clipboard data (think of images and other binary data). |
@jrieken the node-copy-paste module only copies text. This will not work for images. I am attempting to create a markdown extension that will allow the user to copy an image to their clipboard and paste it into their markdown document. When the paste occurs, the extension will save the image to an appropriately named folder and insert the text to display the image when the markdown is compiled. I know this is a closed ticket, but most tickets I have seen in regards to copy/paste reference back to this one. |
Unsure about that. The docs about
The last (readable stream) sounds interesting to me |
@brianwhited how did you go creating that extension? |
@JakeGinnivan I wasn't able to complete this due to not being able to access the clipboard fully. I have not tried since the newest update (1.3) because of time constraints at work. I will be revisiting this shortly. Do you have any suggestions? |
@brianwhited I want to create a extension to paste image to markdown too! @jrieken @brianwhited I tried But I found there is a useful function in Electron API:
But not like Atom,VSCode can't access to Electron API,see #3011 So, how to do ? |
@brianwhited I post a extension that can paste image from clipboard Paste Image Because I use applescript to handle image in clipboard, so it only work in MacOS. |
@jrieken The node-copy-paste is not an ideal solution, for example on default Ubuntu installation it will require the user to install xclip. |
Hi, I'm developing console-wrapper , that is an extension for javascript console.log (other languages support will be added soon) and I need some access for clipboard content in Extensions API. I think this methods should be enough for most of cases:
Some event handlers should be useful, too, like:
-vscode.clipboard.beforeContentLoad()
-vscode.clipboard.onContentLoad()
-vscode.clipboard.onContentLoaded()
Steps for the extension:
hugs,
The text was updated successfully, but these errors were encountered: