asciidoctor / asciidoctor-vscode

AsciiDoc support for Visual Studio Code using Asciidoctor
Other
322 stars 97 forks source link

Dialog to provide filename for image paste #699

Open break2make opened 1 year ago

break2make commented 1 year ago

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.

ggrossetie commented 1 year ago

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

tmichett commented 1 year ago

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 commented 1 year ago

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.

budak7273 commented 2 weeks ago

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_"
}
ggrossetie commented 2 weeks ago

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?