lucide
lucide copied to clipboard
[Feature] Allow copying SVG icon as one line.
If you click Copy SVG
, it copies like this:
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M20 16.2A4.5 4.5 0 0017.5 8h-1.8A7 7 0 104 14.9"></path>
<path d="M12 12v9"></path>
<path d="M8 17l4 4 4-4"></path>
</svg>
But often inline SVG is used, and it does not allow line breaks:
.example-icon:after {
content: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 16.2A4.5 4.5 0 0017.5 8h-1.8A7 7 0 104 14.9"></path><path d="M12 12v9"></path><path d="M8 17l4 4 4-4"></path></svg>');
}
Would be nice to have another copy button for this.
Good idea, we can add it as a feature on the website!
Meanwhile try this tool
https://jakearchibald.github.io/svgomg/
Fixed this one in #796. It now copies svgs in on line as default