Skip to main content
Solved

Paste SVG code no longer available

  • December 27, 2023
  • 2 replies
  • 589 views

marcinukleja

I recall that Figma previously supported pasting SVG elements that were copied as raw code. I used to copy these elements from the inspect panel in a browser and paste them into Figma, where they would be rendered perfectly as vectors.

It appears that this feature is no longer available, which is disappointing as I found it very useful. Is there any possibility of bringing this feature back?

Best answer by marcinukleja

I’ve figured it out! The issue was with the SVG element I was trying to copy: it had an extra apostrophe before the xmlns attribute.

For example, I attempted to copy the following code (it represents a text layer icon in Figma):

<svg class="svg" 'xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 10 10"><path fill="#000" fill-opacity="1" fill-rule="nonzero" stroke="none" d="M0 0h10v3H9V1H5.5v8H7v1H3V9h1.5V1H1v2H0V0z"></path></svg>

After removing the apostrophe in front of xmlns , the code worked perfectly. The next step for me is to find a way to ensure that the code is copied correctly in the first place, without these extra characters.

View original
This topic has been closed for comments

2 replies

marcinukleja
  • Author
  • New Participant
  • 5 replies
  • Answer
  • December 27, 2023

I’ve figured it out! The issue was with the SVG element I was trying to copy: it had an extra apostrophe before the xmlns attribute.

For example, I attempted to copy the following code (it represents a text layer icon in Figma):

<svg class="svg" 'xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 10 10"><path fill="#000" fill-opacity="1" fill-rule="nonzero" stroke="none" d="M0 0h10v3H9V1H5.5v8H7v1H3V9h1.5V1H1v2H0V0z"></path></svg>

After removing the apostrophe in front of xmlns , the code worked perfectly. The next step for me is to find a way to ensure that the code is copied correctly in the first place, without these extra characters.


ksn
Figmate
  • Community Support
  • 1615 replies
  • December 27, 2023

Thank you for the update @marcinukleja ❤️ let us know if any other questions or possible issues come up!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings