svgo-compressor icon indicating copy to clipboard operation
svgo-compressor copied to clipboard

Auto compress when right clicking 'Copy SVG Code'

Open adamgravita opened this issue 8 years ago • 10 comments

Great plugin!

I noticed right clicking Copy SVG Code shows the original uncompressed code, however it would be great to override this somehow. The flexibility of having this as a quick 'SVG copy' with compression would be really useful.

adamgravita avatar Sep 20 '16 09:09 adamgravita

  • 1 on this @bomberstudios. The first thing I checked was if it also worked for 'Copy SVG Code'. Awesome stuff so far!

ScottSavarie avatar Sep 20 '16 14:09 ScottSavarie

I used the 'Copy SVG Code' as an easy way to compare uncompressed code with the resulting compressed code, so I guess I forgot the most obvious use case 😅

I'll see what I can do, thanks for filing!

bomberstudios avatar Sep 30 '16 14:09 bomberstudios

thanks @bomberstudios that is epic!

adamgravita avatar Sep 30 '16 18:09 adamgravita

👍

Any update on this? This would come in super handy.

rnarian avatar Mar 07 '17 12:03 rnarian

Yep, I could really use this to

chrisrowe avatar Jul 11 '17 10:07 chrisrowe

Is anyone working on this? If not, I can dig deeper and get a PR ready.

arorayash avatar Jul 31 '18 06:07 arorayash

Same should be the case when dragging (as opposed to hitting export) the SVG to, say, desktop.

phaistonian avatar Sep 13 '18 14:09 phaistonian

I'd love this - I didn't realise that there was another way to export to SVG, so couldn't figure out why "the plugin didn't work".

dvdsmpsn avatar Dec 11 '18 08:12 dvdsmpsn

I just wrote a plugin here https://github.com/chenxsan/copy-optimized-svg-code, you can copy optimized svg code with it :)

chenxsan avatar Mar 04 '20 10:03 chenxsan

Inspired by the plugin from @chenxsan I just submitted a pull request (https://github.com/sketch-hq/svgo-compressor/pull/72) which adds a new menu-option and shortcut to copy the currently selected layer as SVG to the clipboard.

It will use the same settings as the existing plugin does.

christianheine avatar Aug 23 '20 08:08 christianheine