-
Notifications
You must be signed in to change notification settings - Fork 37.4k
support svg's in image preview #237217
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
support svg's in image preview #237217
Conversation
|
Have you disable the ability of editing the SVG code straight in the editor? Or is there a toggle, where I can change between edit and preview mode? To clarify: sometimes I like to edit svg images straight in the svg code, changing things like, color, stroke and etc. It's much easier then having to leave the VSCode for an image editor. And I know that I can use some extension for this, but I like the native way. |
|
@wendelloliveiradev you need to run the reopen editor with text editor command to get it back: You can set the default with this setting: "workbench.editorAssociations": {
"*.svg": "default",
} |
|
The preview feature is nice, but this setting is not very discoverable, and potentially pretty disruptive. It's in the command palette, but I don't know how anyone would guess what to search for. I had to look through the release notes to find this, since there was nothing in the UI to change back to text editor. A button in the status bar or the top right corner of the editor would be nice. Or a context menu item, or an item in the View menu. Without an easy way for users to find the option to switch back to text editor, I'm afraid this will cause frustration. Lots of users are probably used to using e.g. |
|
FYI @mjbvz |
|
Could we add the same custom editor twice too the package.json? So we add it again for svg with a different priority |
|
Wasted an hour trying to figure out how to get a regular text editor back for the SVG. At the very least a right-click option should be available to switch to the text editor. As it is, it’s a big regression in productivity for me. Installing one of the SVG editing extensions won’t help neither, it still shows the dumb preview by default. Or why not do the sensible thing and show a text editor with a preview of the SVG in some corner of the screen. |
|
I'd love the functionality to be more similar to https://github.com/lishu/vscode-svg2 where I can have the svg text on one side and the preview on the other |
|
I just ran into an issue with this and finally found the root cause. VS Code is a code-first IDE and displaying images when you want the source XML of the SVG is very inefficient. I just can't begin to imagine how many hours will be wasted due to this behavioral change. With that said, I appreciate the effort put into VS Code by the community. |

fixes: #237216