Closed riccardoferretti closed 2 years ago
@riccardoferretti, also a fan of the extension and so are my colleagues.
Great idea and I think it is possible.
If that is helpful, you can get a good idea of where the external script in charge of findin data in the Clipboard and how it communicates with the javascript side of the plugin by staring at my pull request: https://github.com/mushanshitiancai/vscode-paste-image/pull/85/files
So on windows for example the current powershell returns:
$img = [Windows.Clipboard]::GetImage()
if ($img -eq $null) {
"no image"
Exit 1
}
We would need to tweak this so we know when to fall back to the standard Paste. We would need to do the same for each OS and their own external script.
hey @hmalphettes, I was wondering if you could use the vscode editor.action.clipboardPasteAction
command instead and have it deal with the OS specific implementation, wdyt?
Hi @riccardoferretti
This repository has not seen any activity in over 3 years. There is an actively maintained fork here: https://github.com/telesoho/vscode-markdown-paste-image
With that said, I considered implementing the feature you are asking for and decided against it for the following reasons:
I recommend treating ctrl+v as simple paste and ctrl+alt+v as rich paste.
Thanks for the reply @knyzorg - you are bringing up good points
Hi, I really like the extension, thanks for your work. The only thing I found less intuitive was the different keyboard shortcut,
cmd+alt+v
I was curious to map the command to
cmd+v
, but couldn't do it because when there is text and not an image in the clipboard, instead of pasting I get a notification.Would it be possible to have Paste Image:
This way we wouldn't need to remember a second key-combo, wdyt?