Giter Site home page Giter Site logo

dendron-paste-image's People

Contributors

donmartin76 avatar gep13 avatar gojanpaolo avatar jonathanyeung avatar kevinslin avatar mushanshitiancai avatar scriptautomate avatar vallentin avatar ysknkd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

dendron-paste-image's Issues

Marketplace: correct GitHub repo

dendron.dendron-paste-image is an official extension, currently associated with mushanshitiancai/vscode-paste-image, which is no longer maintained.

dendron.dendron-paste-image says it was last updated "8/18/2022", which is when this repo was last updated, so clearly this repo is the real power behind the throne. Is it possible to update dendron.dendron-paste-image to point to this repo?

This will reduce confusion, both when new users are evaluating extensions, and when users of this extension wish to report issues.

Not Working with Windows Powershell in "ConstrainedLanguage" Mode

If the Windows Powershell is set to "ConstrainedLanguage" mode and/or the execution of Powershell scripts is prohibited by the administrator the Dendron: Paste Image command does not work.

I tried to manually save an image from my system clipboard to the hard drive with Powershell with

$img = Get-Clipboard -Format Image
$img.Save(".\img.jpg")

Essentially, this is what this extension does. When I do this I get the following error:

Cannot invoke method. Method invocation is supported only on core types in this language mode.
[...]

Unfortunately I wasn't able to get the error message from VSCode.

I suspect that even the execution of the .ps1 script file will be blocked by the systems administrator.

Name files YYYY-MM-DD_HH-mm-ss_<selected text>.png

At the moment I can get the extension to save the screenshot as either the date.png or the .png. I would be able to have the name YYYY-MM-DD_HH-mm-ss_.png as it would be easier to find the files in the file system this way.

In my head it would be a option to append date (in the format under the settings) to the selected text, if any.

Images are not placed in the "notes/assets/" directory for compatibility with publishing

When pasting images, the dendron-paste-image extension places the image in "notes/" directory. However, these need to be placed in "notes/assets/" in order for them to publish correctly. Though the images appear correctly in the VSCodium/VSCode dendron preview pane, when published, the images are broken, presumably because they're not placed in the "notes/assets/" directory.

Replicating the problem:

(Assuming you have Dendron and the Dendron Paste Image extension installed:)

  1. Create a new Dendron workspace
  2. Copy and image to the clipboard, then use the "Paste Image" feature from the command pallet to insert an image into an dendron note.
  3. Look at the file structure, note that the image is stored in the notes/ directory.

To test the publishing result:

(Assuming you have the dendron-cli installed)
5. At the command line, in the worspace directory initialize for publishing: npx dendron publish init
6. preview the site: npx dendron publish dev
7. View it in a browser at "localhost:3000"
8. View the site. In my case, the images are broken. The links refer to "/image.png", but no images appear.

Tested with:

  • VSCodium: 1.68.0
  • Dendron v0.105.0
  • dendron-cli 0.105.1
  • Dendron Paste Image: v1.1.0
  • Linux Mint 20.2

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.