-
Notifications
You must be signed in to change notification settings - Fork 27.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Markdown: Paste image from clipboard - image filename #183560
Comments
This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation. Happy Coding! |
🙂 This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation. Happy Coding! |
As a note, the copy files destination setting is no longer experimental. However, an issue exists where when you paste an image, the If images is the only thing you want to paste, this is an effective workaround for now: "markdown.copyFiles.destination": {
"**": "images/${documentBaseName}/image.png"
} |
I am looking for a way to provide a filename template in |
Right, additional wildcards for GUID and DateTime would be great. FYI this functionality is already available in an extension, but it would be nice for it to be first party. |
I agree, having this functionality integrated directly into VSCode without relying on an extension would be highly beneficial. Furthermore, I have tested these extensions and discovered that they do not function when opening VSCode in a WSL2 Linux distribution, such as Ubuntu. Pasting an image using such extensions give an error 'There is not an image in the clipboard.' even after installing |
I think there is a bug in PROJECT_DIR/test/read.md The config is instead of just The It works the same for either WSL2 and Windows |
Please make the naming of the image as customizable as vscode snippets, with the same variables available, and same features (eg. regular expression match and substitution of variable expansions). |
It'll be great to have such functionality integrated directly into VSCode. |
Also, sometimes when writing markdown you want to insert images using the html |
I would like to add to this one as well, when I work on notes or docs etc in VS Code I love the ability to just paste a screenshot into the markdown but I would like to be able to give my file a descriptive name, not just "image", a timestamp or a GUID. I can see a couple of ways that could work:
|
Thanks for sharing. This worked like charm. |
I was also looking for a way to customize the image file names e.g. {
"markdown.copyFiles.destination": {
"/**/*": "${documentWorkspaceFolder}/.attachments/${documentBaseName}_Images/${markdownHeader}-${dateTime}.png"
}
} And say I have a markdown file in # Instructions
## Getting Started
![Alt text](.attachments/Instructions_images/Getting-Started-2024-03-08-10:50:00.png) Which would make the images easier to maintain. |
Thanks @A-Rai-col =D I'm aware of this feature - it's great but it would be ever better to be able to rename the file if needed =D |
It seems that it is still not supported now, right? |
Type: Feature Request
OS Name: Microsoft Windows 10 Enterprise
VSCode 1.78.2
Extensions: WSL, Git Graph, Markdown Preview Mermaid Support
Scenario:
Paste image from clipboard in markdown, and use current-date-time or GUID as image file name.
Steps:
Ask/How-to:
Instead of using the default image.png, image-1.png,... etc. I would like to specify filename for the pasted image in markdown using current-date-time, or GUID or other custom format. It'll be good to have an ability to pre-define such formats, and (optionally) the ability to override at runtime.
For example:
VS Code version: Code 1.78.2 (b3e4e68, 2023-05-10T14:39:26.248Z)
OS version: Windows_NT x64 10.0.19045
Modes:
Sandboxed: Yes
Remote OS version: Linux x64 5.15.90.1-microsoft-standard-WSL2
The text was updated successfully, but these errors were encountered: