ryanmcalister / unotes

Unotes Visual Studio Code Extension. A markdown WYSIWYG notes editor.
MIT License
173 stars 22 forks source link

Feature Request: Prevent image duplication when dragging and dropping image files in the media folder. #133

Closed kiyoka closed 1 year ago

kiyoka commented 1 year ago

When I drag and drop an image from the media folder, I want it to be assumed that I am reusing the same image.

Current behavior (Unotes v1.4.3)

  1. the media folder setting is "./img" image

  2. Drop and drop the file "./img/green1.png" dnd1

  3. Unotes duplicates the image and save as "./img/img_0.png"

  4. The image link will be as follows. dnd2

Desired behavior

I want it to be markdown as follows.

![green1.png](./img/green1.png)

Implementation plan

We can Implement at onPaste(e) function. argument e has full path of the image file.

ryanmcalister commented 1 year ago

I can see how this might fit certain work flows. I think this change is the a good idea. Thanks!