Markdown Paste image VS Code
Paste an Image from clipboard into markdown for VS Code InstallationLaunch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Features
There are other plugins that had this feature, but they were not maintained, had bugs, or had tons of features I didn't want. So here is a simple extension that does one thing and one thing only and does it with tests! RequirementsLinux
Example on Ubuntu
Windows
Mac
ConfigurationBelow are the options you can set in your Image Folder PathThe destination to save image file. You can use variable
Default Image NameThe default image file name. The value of this config will be pass to the 'format' function of Luxon library, you can read document https://moment.github.io/luxon/#/formatting?id=table-of-tokens for usage. If you have text selected, it will be used as the file name instead.
Image Name PrefixThe string prepended to the image file name.
Image Name SuffixThe string appended to the image file name.
Image Uri Path PrefixThe string prepended to the resolved image path. Can be used if you want to supply a custom domain to image url.
Image Uri Path SuffixThe string appended to the resolved image path. Can be used if you want to supply a custom parameters to image url.
Encode PathThe string appended to the image file name. How to encode image path before insert to editor. Possible Values:
Insert PatternThe pattern of string that would be pasted to text.
Show File Path Confirm Input BoxSet to true if you want to be able to change the file path or name prior to saving the file to disk
File Path Confirm Input Box ModeSet the mode of file path confirm input box Possible Values:
VsCode PublishCreditsI wanted to make this plugin after issues with markdown image paste mushan.vscode-paste-image. After looking for an alternative and finding out that it looked like there were half a dozen copies and most were forks, or no longer maintained. I decided to use Anthony Fu's repo for vscode-smart-clicks as a starting point. And then build from there to have the features that I wanted. LicenseMIT License © 2022 Chris Towles |