capture screen to clipboard or copy from somewhere like Wechat.
Open the command palette: Ctrl+Shift+P (Cmd+Shift+P on Mac).
Type: "pasteImageToMarkown" or you can use default keyboard binding: Ctrl+Alt+V (Cmd+Alt+V on Mac).
Image will be saved in the folder or Upload to the Qiniu clound.
The image path or url will be paste to current editing file.
Extension Settings
Include if your extension adds any VS Code settings through the contributes.configuration extension point.
For example:
This extension contributes the following settings:
pasteImageToMarkdown.mode: Disk / QiNiu, The terminal to save image file. There're Local Disk, QiNiu cloud and so on. If you choose QiNiu mode, the image will store on the local disk before uploading to the cloud. And the temporary image will be clear after image upload. (QiNiu mode is internal use.)
pasteImageToMarkdown.path: The destination to save image file.You can use variable ${currentFileDir} and ${projectRoot}. ${currentFileDir} will be replace by the path of directory that contain current editing file. ${projectRoot} will be replace by path of the project opened in vscode.
pasteImageToMarkdown.basePath: The base path of image url.You can use variable ${currentFileDir} and ${projectRoot}. ${currentFileDir} will be replace by the path of directory that contain current editing file. ${projectRoot} will be replace by path of the project opened in vscode. If you set basePath to empty String, it will insert absolute path to file.
pasteImageToMarkdown.forceUnixStyleSeparator: Force set the file separator styel to unix style. If set false, separator style will follow the system style.
pasteImageToMarkdown.prefix: The string prepend to the resolved image path before paste.
pasteImageToMarkdown.suffix: The string append to the resolved image path before paste.
pasteImageToMarkdown.defaultName: The default image file name. The value of this config will be pass to the 'format' function of moment library(a js time manipulation library), you can read document https://momentjs.com/docs/#/displaying/format/ for advanced usage.
pasteImageToMarkdown.namePrefix: The string prepend to the image file name.
pasteImageToMarkdown.nameSuffix: The string append to the image file name.
pasteImageToMarkdown.encodePath: The string append to the image file name.How to encode image path before insert to editor. Support options: none, urlEncode, urlEncodeSpace.
pasteImageToMarkdown.insertPattern: The pattern of string that would be pasted to text.
pasteImageToMarkdown.showFilePathConfirmInputBox: Set to true if you want to be able to change the file path or name prior to saving the file to disk
pasteImageToMarkdown.filePathConfirmInputBoxMode: Set the mode of file path confirm inputbox