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
Paste images from clipboard / screenshots #4306
Comments
Any news on this? I have become very familiar with the code base and writing plugins lately so I want to take on this task and write it as a plugin if no one has done this already. |
@Bamieh I don't know any existing plugin for doing this from the time I posted this isse, but I think many people including me will be very appreciated if there is a working one! |
@leemengtaiwan I am almost done with the basic implementation, i'll share the results soon 😄 |
I think this is important to be in core. I'm excited to see your implementation! |
@jasongrout I am starting to get this error all out of the blue:
It was working fine just a moment ago 😕 |
The existing mechanism for this in classic notebook is using attachments, but the user interface for adding attachments has not yet been added to lab. See also #4333. If you want to work on it, the best place to add the code is likely in the attachments package. Hope this helps 👍 |
See also #4828. |
@vidartf thank you, I am done with the implementation (as a separate plugin for now called clipboard). But just before I publish I started getting this error that im still stuck on:
Any clue?
|
Sometimes this happens if you accidentally have two packages that aren't deduped. One thing you can try is to clean out your node_modules and do |
@jasongrout thank you. here is a link to the extension: https://github.com/Bamieh/jupyterlab-clipboard |
@Bamieh, tried it out and it works quite well. Thanks! |
@Will-So awesome! i'll improve the implementation gradually within these few days |
I've created an extension to restore the original UI for attachments here. I've also added the ability to add from the File Browser Tree context menu. I'm going to look into adding the clipboard paste feature too, but I could use some input on this, as I'm not sure where it is appropriate to add the event handler (as it seems one must handle this through native JS code rather than any JupyterLab API?) |
@ZedTDean I tried to paste OneNote-clipped screenshot into JupyterLab and it works now. The image file is saved in some binary format, directly to the Note 1: Github does not render screenshots in Markdown cells, nor does colab. nbviewer renders things perfectly, as in this example. Note 2: There can only be one unique screenshot in one Markdown cell. Pasting one more screenshot into the same Markdown cell will refresh the existing screenshot. Issue #4333, once solved, can allow us to insert more than one screenshot into a single Markdown cell. |
@llinfeng as of version 2.1 you can paste multiple images into the same cell and they won't overwrite. |
I just tested this as well, and in the latest version, I can paste multiple images into a markdown cell successfully. Closing as fixed. Thanks everyone! |
Hi, I wonder if there is a way to paste images into (MarkDown) cells directly from clipboard? This will be a lot of help because I frequently take screenshots and incorporate them into Markdown cells in my notebooks.
The Pycharm equivalent plugin of this feature is Paste Image To Markdown.
Any comments is appreciated, thanks in advance!
The text was updated successfully, but these errors were encountered: