Giter Club home page Giter Club logo

vscode-paste-image's People

Contributors

donmartin76 avatar dora-cmon avatar gep13 avatar gojanpaolo avatar mushanshitiancai avatar sakamoto66 avatar vallentin avatar ysknkd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

vscode-paste-image's Issues

Feature request: "image in clipboard" when clause context

Binding extension.pasteImage to Ctrl + V feels great since it overrides the otherwise unchangeable (?) awful vanilla markdown insert pattern: ![Alt text](image.png).

It'd be great if it only fired when there's an image to paste (vscode clearly does it). I'm aware the clipboard API and provided when clause contexts are currently pretty limited, but curious about the possibility nonetheless

Doesn't work on macOS because of broken res/mac.sh

Thanks for the nice extension! This works fine on Windows, but I am seeing the faild save image of clipboard error on mac.

I found that the packaged shell script, res/mac.sh, has CRLF as the end-of-line sequence. What's more, the error disappears if I fix this.

I also noticed that my clone of this repo correctly has LF. So I guess you have something like the autolrcf setting on with Git for Windows in your packaging environment, which automatically converts LF to CRLF, and, consequently, the converted mac.sh goes to the packaged extension. I haven't checked, but the same problem might be happening with linux.sh.

Could you fix this problem?

Can't create images when using ${projectRoot} variable

I am using VSCode in Windows using Remote SSH to connect to my project in a Ubuntu VM.
When I set Paste Image Path to ${projectRoot} then the markdown is inserted but the image file is never created (I don't see any errors)
If I paste the image using default settings of ./ then it creates the image file and inserts the markdown as expected.

I don't think it is a permissions issue because if I paste into a MD file in project root and use ./ then it creates the file ok.

working with wsl2

I find that vscode.workspace.fs in file paster.js function saveImage(saveFile, base64) could only read or write windows path. for example this works

let a=yield vscode.workspace.fs.readFile(vscode.Uri.file('C:\\path\\to\\a\\textfile\\a.md'));
console.log(a);

but the img path to paste is something like vscode.Uri.file('/path/to/image/a.png') is a linux path
my setting is "pasteImage.path": "${projectRoot}/img_md",
Am I using the extension in expected way?
Or the expected behavier is that only paste-base64 is working for remote connecting?

Feature request: configuration option for the insert pattern

Hello,

I have been using this plugin for a while and am very grateful for your work.

However, the insert pattern for the image seems to be unchangeable, which is essential for people, at least for me, who write blogs in markdown and want to set the size or position for their pictures.

So if it's possible to add a configuration option like pasteImage.insertPattern? Potential config can be like: pasteImage.insertPattern: <cetner><img src=${imageFileName} width=400></img></center>.

I believe this plugin supports this feature(yet cannot work in wsl so far), which might be a useful reference.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.