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

Pasting SVGs from sources like Figma requires closing tags #4589

Closed
johnsicili opened this issue Dec 15, 2024 · 1 comment · Fixed by #4699
Closed

Pasting SVGs from sources like Figma requires closing tags #4589

johnsicili opened this issue Dec 15, 2024 · 1 comment · Fixed by #4699
Assignees
Labels
area:settings Settings panel on the right prio:2 Always look for prio:1 issues first before working on prio:2 type:bug Something isn't working

Comments

@johnsicili
Copy link
Contributor

When pasting an SVG, Webstudio won't render it because the parser thinks the tags need to be closed. The user can click the fix automatically button to fix it.

  1. Add html embed
  2. Paste svg
  3. See error and no rendering

Example svg:

<svg width="296" height="296" viewBox="0 0 296 296" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="148" cy="148" r="148" fill="#D9D9D9"/>
</svg>
svg.mp4
@johnsicili johnsicili added type:bug Something isn't working area:settings Settings panel on the right prio:2 Always look for prio:1 issues first before working on prio:2 labels Dec 15, 2024
@kof
Copy link
Member

kof commented Jan 2, 2025

As html embed is in context of html editing, I don't think we can easily change this, as SVG here has to follow HTML rules. I think we can leave it won't fix and in the future the Icon Component will have an svg context with a different document mode, @TrySound agree?

TrySound added a commit that referenced this issue Jan 2, 2025
Fixes #4589

Just added xml parser before html one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:settings Settings panel on the right prio:2 Always look for prio:1 issues first before working on prio:2 type:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants