asciidoctor-vscode icon indicating copy to clipboard operation
asciidoctor-vscode copied to clipboard

Dialog to provide filename for image paste

Open break2make opened this issue 2 years ago • 5 comments
trafficstars

ctrl + alt + v pasting image clipboard with default name. Is it possible to have a dialog box to provide filename? Similar feature is present in VS Code Paste Image plugin.

break2make avatar Jan 30 '23 06:01 break2make

That's a good idea, feel free to submit a pull request.

ggrossetie avatar Feb 01 '23 09:02 ggrossetie

Or if we can't have a dialog box, maybe expose settings that we can change ...

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

https://github.com/mushanshitiancai/vscode-paste-image

I've had decent luck with the above Extension, however, it breaks when used with your extension. If the Asciidoctor-VSCODE extension is uninstalled, it is possible to use the vscode-paste-image extension and specify some settings and those will be honored.

CleanShot 2023-03-31 at 10 57 42@2x

CleanShot 2023-03-31 at 10 58 11@2x

It would appear that some of the image pasting is hard-coded in the application here and I'm not the greatest coder (more of an admin and can change small snippets of code).

tmichett avatar Mar 31 '23 14:03 tmichett

FYI, I can get both plugins to run and do what I want on a Windows system, I just can't do it on a MacOS system and don't think I can do it on Linux either, but haven't tried as much there.

tmichett avatar Mar 31 '23 15:03 tmichett

Since asciidoc's paste image feature offers no configuration, it always puts images in an invalid location and is not useful for my project.

I was able to get the mushan.vscode-paste-image extension working at the same time as this one by removing the keybinding for the asciidoc-offered feature.

Here's the settings I use for the other extension:

{
    "pasteImage.showFilePathConfirmInputBox": true,
    "pasteImage.basePath": "${projectRoot}/modules/ROOT/images/",
    "pasteImage.path": "${projectRoot}/modules/ROOT/images/organizeMe",
    "pasteImage.defaultName": "Y-MM-DD-HH-mm-ss",
    "pasteImage.namePrefix": "renameMe_"
}

budak7273 avatar Jun 21 '24 14:06 budak7273

Since asciidoc's paste image feature offers no configuration, it always puts images in an invalid location and is not useful for my project.

@budak7273 I think you are referring specifically to the use case where you copy/paste an image with an Antora structure? This is probably related to https://github.com/asciidoctor/asciidoctor-vscode/issues/830?

ggrossetie avatar Jun 22 '24 10:06 ggrossetie