mushanshitiancai / vscode-paste-image

paste image from clipboard to markdown/asciidoc directly!
MIT License
424 stars 129 forks source link

[feature request] support encoding img to base64 and link with referer when c-a-v #74

Open NewUserHa opened 4 years ago

NewUserHa commented 4 years ago

there could be annoying that always create local img file after press c-a-v.

can we add an option to support encoding img to base64 and link with referer in the file when c-a-v?

sakamoto66 commented 4 years ago

hi, @NewUserHa

Do your ideas fit in this video? https://drive.google.com/file/d/1wQVrYstNQ9DhanRFBxhcgfPZVVPY2GkU/view?usp=sharing

NewUserHa commented 4 years ago

hi, @sakamoto66

The video is right.

That the img in preview windows could be saved to file via right-click can be better.

Do you know if the change can be merged?

sakamoto66 commented 4 years ago

It doesn't seem to be active now, so I fork it and maintain it. I have no plans to merge.

https://github.com/sakamoto66/vscode-paste-image https://marketplace.visualstudio.com/items?itemName=sakamoto66.vscode-paste-image

This feature has just been released.

That the img in preview windows could be saved to file via right-click can be better.

preview windows not have context menu. https://code.visualstudio.com/api/references/contribution-points#contributes.menus

If you have a good idea, let me know!

NewUserHa commented 4 years ago

the last activity of this repo was about 6 months ago. And it could be awesome if everyone can also benefit from this feature.

hope this repo can check the PR list soon and there's a PR of this feature.

thanks

NewUserHa commented 4 years ago

saving base64 to file may use the right-click menu when selecting the img base64 content in the editor window, and may combine with the current behavior on shortcuts when pasting via settings.

sakamoto66 commented 4 years ago

Hi, @NewUserHa

sakamoto66.vscode-paste-image has been updated to version 1.1.8. Support convert base64 text of clipboard to image data!

  1. Copy base64 text (Ctrl + C)
  2. Paste Image (Ctrl + Alt + V) or Select Create image from clipboard to context menu or Select Paste image of clipboard to context menu
NewUserHa commented 4 years ago

Great. thanks but a lot of users can't get this update

sakamoto66 commented 4 years ago

I just tried It was installed when reboot.

NewUserHa commented 4 years ago

I meant これをもうインストールしている他の人は、この更新取得できない

sakamoto66 commented 4 years ago

Please try. select Check for extention Updates to extention menu ...

image

NewUserHa commented 4 years ago

it can't be previewed image

sakamoto66 commented 4 years ago

It's a problem with markdown.

before

![][2020-08-31-15-21-17.png]
[2020-08-31-15-21-17.png]:data:image/png;base64,

after

![][2020-08-31-15-21-17.png]

[2020-08-31-15-21-17.png]:data:image/png;base64,

note: add empty line under line of "![][2020-08-31-15-21-17.png]".

NewUserHa commented 4 years ago

it worked.