Closed LuposX closed 6 months ago
Thanks for reporting the issue!
First issue: Copying from file browser does not work
This doesn't work because the clipboard content is indeed not an image. It's actually a reference to a file (rather than the content of the file). I can account for this in code though, by allowing file paths as input to the PasteImage
function and then just copying the file to the correct location (this is how drag and drop works currently). I'll look into it sometime this week.
Second issue: copy_image
is not working
This is due to a typo in your configuration. It's copy_images
, not copy_image
:
drag_and_drop = {
copy_images = true,
insert_mode = true,
},
@HakonHarnes Thank you for your help, great work!
@LuposX How is feat/allow-file-paths-as-input
working out for you? Just set the branch
option in Lazy accordingly and update to try it out.
Describe the bug I have two separate problems, but I will list them in on issue because I suspect that they might be linked. The first one is when I copy a Image I can't insert it into my markdown file via the command
PasteImage
I get the error:Clipboard content is not a Image.
The second one is changing the values ofcopy_image
doesn't change the behavior of the plugin.Steps to reproduce For the first one:
PasteImage
in a markdown fileClipboard content is not a Image.
For the second one:
copy_image
totrue
attachment
folder, instead it will only link to the existing image.Screenshots https://github.com/HakonHarnes/img-clip.nvim/assets/36456825/c22b37b6-a2ce-4acf-a6d4-54d436830379
https://github.com/HakonHarnes/img-clip.nvim/assets/36456825/07edd180-068c-4f55-a1ad-497e4d064d76
Desktop (please complete the following information):
My Config