How to copy a figure from note editor?

Hello there,
I am getting used to the new note editor in Zotero 6. Using Obsidian, I'd like to copy over text and figures from time to time.
I noticed, once I selected a note panel on the left side, if I press [cmd]+[c] it copies the location of the note, like:
-----------
“fancy sentence from the document” ([Author et al., 2013, p. 1](zotero://select/library/items/ABC123)) ([pdf](zotero://open-pdf/library/items/DEF456?page=1&annotation=GHI789))
-----------

That is quite nice, but doing that with figures leads to:
-----------
\[image\] ([pdf](zotero://open-pdf/library/items/DEF456?page=2&annotation=GHI789))
-----------

I see the markdown as a great benefit here, but also I miss a way to copy just the image, or just the plain text without links. Maybe something like [cmd]+[e] for "export to clipboard" would be nice, to avoid collisions with existing implementation.

Side note from skimming the repository: Smells to me like a decorator pattern/higher order component, which could be configured in the Zotero preferences and used once the note editor is initialised (if not already possible somehow).

  • There are two ways to paste an image to a markdown file:
    1. Copy the image file link in Zotero storage. This could be dangerous because these cached images may be removed anytime.
    2. Copy the encoded string of the image. These strings are usually very long, making the markdown file massive and rendering slowly.

    The best way to export note content to markdown files is to export the note to a markdown file directly.
    Right now Zotero's note2markdown cannot handle images. You could try the plugin https://github.com/windingwind/zotero-better-notes

    Images will be copied to the 'attachments' folder under the export target directory, the same as what Obsidian does.
  • I believe your answer is missing the point: I just want to copy image :)
    I am well aware of base64-encoded data URLs in markdown files and they make the files hard to maintain sometimes - no option in my opinion.

    But you can also paste images as an ordinary BLOB. Doing so and using the Custom Attachment Location Plugin (see: https://github.com/RainCat1998/obsidian-custom-attachment-location ) images are copied (and hidden in a subfolder) within my Obsidian vault. Pretty convenient, but the question is how to copy the images from the notes editor because I am not able to get the only figure/image from it.

    At the moment I make screenshots from some figures, which feels wrong to me since I already highlighted/marked them. Shouldn't something like that not be supported by Zotero itself? That was never a problem using Paperpile.
  • So to be clear, you're asking for a way to copy just the image data for a single image to the clipboard, without the annotation?
  • Almost: I wonder how to copy the images from the note editor (left pane opening a pdf with annotations), w/o comments.

    I use a subset of the figures to paraphrase some papers for learning reasons in Obsidian. And like I said: I do it by screenshots at the moment.

    Do you have an advice?
  • I wonder how to copy the images from the note editor (left pane opening a pdf with annotations)
    The left pane in the PDF reader isn't the note editor — that's the annotation sidebar.

    This isn't possible now. We're just trying to understand what you're actually asking for.
  • edited June 18, 2022
    @alfred.feldmeyer

    Hi, I made some effort to realize this 'copy selected annotation as image blob'.

    Later I'll make it part of the addon mentioned above. Any ideas about how to trigger it? As I don't want to overwrite Zotero's default copy method, placing a small icon on the annotation sidebar may be a workaround.
  • @hsiangyu_wong: I appreciate the work you’ve put into your plugin and the pace with which you’ve been developing it, but when people post here with feature requests for Zotero, we need to be able to have conversations about adding those features — in a way that will actually benefit all Zotero users — without everything getting derailed by plugin discussions. We can implement this. We just first need to understand what @alfred.feldmeyer is actually asking for. (We also take pull requests, obviously. Not everything belongs in a plugin.)
  • @alfred.feldmeyer

    Hi, the plugin update v0.5.14 adds a small button for every annotation(type=image) on the annotation sidebar. Click it and the image will be copied as blob.

    See how to use it here: https://github.com/windingwind/zotero-better-notes/raw/master/image/README/copyimage.png
  • edited June 18, 2022
    I fully understand @dstillman your concern: this is a Zotero forum. Sorry for any possible offense.

    Plugins are the non-official way to realize what currently is not supported. We can advance the tasks quickly without historical burdens. Pull requests must be carefully reviewed and are time-costing.

    Just like Zotfile: plugins first realize some features and after a long time that these are proved useful, Zotero will do them.

    Time waits for no one. When these features are finally officially supported, many users that used to need them may have already graduated or quit their job and no longer need to read papers.

    Anyway, the code is always there. Zotero developers can use them freely. I'll be glad to see these features be supported in the future and at last no one will need my plugins.
  • That's all true, but this thread is four days old, and we're still trying to clarify what the OP was actually asking for, so the plugin talk is just distracting. We're more than happy to see plugins implement features people have been waiting for — I'd just suggest it might be worth focusing on things we're not actively trying to support.
  • You are right. I guess alfred.feldmeyer needs a way to copy the annotation image as blob, as he mentioned above.
    The first reply about the plugin may be misleading. My bad. Sorry for that.
  • Sorry for the late response #PhDLife.

    I guess, it's like @hsiangyu_wong wrote: I want to copy images as blob. And for whatever it's worth, I am with @dstillman on this, since I have a strong feeling something like this should be part of Zotero itself. To give a better impression, I will try to express my use case:

    - I use the Zotero client on my iPad to mark lines and figures while I commute.
    - Back on the desk I rephrase some paragraphs to get a deeper understanding (copy&paste is not learning to me). There are two situations I want to copy the pure image without markdown:

    - a) I discuss some of the recently read papers with my colleagues and paste them figures via chat. Since I am not able to copy it directly, I use the screenshot feature of macOS. Linking a paper never makes them so curious as sending them some images :)

    - b) While paraphrasing a paper, sometimes I need a figure which contains an example or table of results, etc. At this moment I open the papers in Zotero and make a screenshot too.

    As I already marked those figures (marked with the rectangle tool), I wonder if it wouldn't be easier to copy the images from the note editor somehow. Kind of a "raw" copy.

    So WDYT @dstillman ?
  • edited June 21, 2022
    Yes, we've created a ticket to add the ability to both save annotation images to disk and copy them to the clipboard directly — basically the equivalent of the two options you get when right-clicking on an image in the browser.
  • Wow, that would be great. Thanks
  • Thanks, @dstillman! Happy to see this will be implemented inside Zotero.
  • In Zotero 6.0.14, available now, we've added "Copy Image" and "Save Image As…" options to the context menu for image annotations.
  • Sorry for the late response. I just tested it and its works perfectly! Thank you very much!
Sign In or Register to comment.