Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy SVG icon content to clipboard #1093

Open
quyleanh opened this issue Oct 15, 2020 · 10 comments
Open

Copy SVG icon content to clipboard #1093

quyleanh opened this issue Oct 15, 2020 · 10 comments

Comments

@quyleanh
Copy link

How can I do quick copy SVG icon content to clipboard?

For example when I do copy instead of download, the clipboard content will be something like this

<svg fill="none" viewBox="0 0 24 24" height="24" width="24" xmlns="http://www.w3.org/2000/svg">
<path xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" d="M12 4C12.5523 4 13 4.44772 13 5V16.5858L17.2929 12.2929C17.6834 11.9024 18.3166 11.9024 18.7071 12.2929C19.0976 12.6834 19.0976 13.3166 18.7071 13.7071L12.7071 19.7071C12.3166 20.0976 11.6834 20.0976 11.2929 19.7071L5.29289 13.7071C4.90237 13.3166 4.90237 12.6834 5.29289 12.2929C5.68342 11.9024 6.31658 11.9024 6.70711 12.2929L11 16.5858V5C11 4.44772 11.4477 4 12 4Z" fill="#282828"></path>
</svg>
@nt4f04uNd
Copy link

Yup, would be extra cool

@nt4f04uNd
Copy link

nt4f04uNd commented Oct 17, 2020

I had nothing to do so I created a script for tampermonkey till this won't be added
https://github.com/nt4f04uNd/tampermonkey-scripts/

@quyleanh
Copy link
Author

@nt4f04uNd so cool. Thank you for your kind help.
Hope this will be added soon on the main website.

@nt4f04uNd
Copy link

@quyleanh fixed it a bit, so if you been using it, you can update

@quyleanh
Copy link
Author

quyleanh commented Mar 3, 2021

@nt4f04uNd could you please update for https://fonts.google.com/icons site? Thank you.

@nt4f04uNd
Copy link

@quyleanh i opened dedicated issue in google fonts repository and updated the script in the meantime https://github.com/nt4f04uNd/tampermonkey-scripts/

@quyleanh
Copy link
Author

quyleanh commented Mar 3, 2021

@nt4f04uNd thank you for your kind support.

@dillingham
Copy link

dillingham commented Mar 8, 2021

Yes this is a very useful enhancement.


Steps for putting SVG code directly in the components

  • Downloading an SVG
  • Open file
  • View source
  • Select all
  • Copy

Would be nice to have a SVG copy to clipboard option

  • Copy SVG

Example out in the wild: https://heroicons.com/

--

Pros: Reduce HTTP requests for downloads

@tphinney
Copy link
Collaborator

tphinney commented May 4, 2022

Seems like a feature to add to https://fonts.google.com/icons

@inwardmovement
Copy link

Any news on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants