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

SVG Support for Live Server #126093

Closed
andreamah opened this issue Jun 11, 2021 · 2 comments · Fixed by microsoft/vscode-livepreview#19
Closed

SVG Support for Live Server #126093

andreamah opened this issue Jun 11, 2021 · 2 comments · Fixed by microsoft/vscode-livepreview#19
Assignees
Labels
feature-request Request for new features or functionality live-preview Issues for the Live Preview extension. Please file these under the vscode-livepreview repo instead. on-testplan
Milestone

Comments

@andreamah
Copy link
Contributor

Currently, SVGs are shown as its source code in the external previews and not at all in the embedded preview..
Ideally, we would like it to render properly and refresh live like html files.

@andreamah andreamah added feature-request Request for new features or functionality live-preview Issues for the Live Preview extension. Please file these under the vscode-livepreview repo instead. labels Jun 11, 2021
@andreamah andreamah self-assigned this Jun 11, 2021
@andreamah
Copy link
Contributor Author

We cannot have them auto-refresh with the current injection strategy, as there are limitations scripts outside of the svg tags.

@andreamah
Copy link
Contributor Author

For verifier: Try using <object type="image/svg+xml" data=SVG_FILE_NAME></object> in your preview's html to see if your svg correctly links and displays in external browser preview. As you make changes with the svg file, the html page should also be refreshing.

As of right now, SVGs will not show in embedded preview, since there are some security limitations behind retrieving svg files within a webview iframe.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality live-preview Issues for the Live Preview extension. Please file these under the vscode-livepreview repo instead. on-testplan
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant