Powerful SVG-Editor for your browser
SVGEdit is a fast, web-based, JavaScript-driven SVG drawing editor that works in any modern browser. SVGEdit is based on a powerful SVG canvas @svgedit/svgcanvas
SVGEdit is the most popular open source SVG editor. It was started more than 15 years ago by a fantastic team of developers. Unfortunately, the product was not maintained for quite a long time. We decided to give this tool a new life by refreshing many aspects.
Please let us know by creating an issue or a discussion if you wish to contribute.
Thanks to Netlify, you can access the following builds from your favorite browser:
We recommend using the V7 version but for older browsers or some abandoned features, you may need to access older versions of SVGEdit.
Additional tip: you may try a version released on NPM using unpkg, for example, with version 3.2.0
If you want to host a local version of SVGEdit, please follow these instructions:
npm i to install dependenciesnpm run build --workspace @svgedit/svgcanvas to build the svgcanvas dependency locallynpm run start to start a local serverhttp://localhost:8000/src/editor/index.html with a supported browsernpm run build to build a bundle that you can serve from your own web serverThanks!
SVGEdit is made of two major components:
You should fork SVGEdit in your github environment and install SVGEdit locally as explained above.
Before you submit your PR, please make sure you run locally:
npm run lint to check that you follow the standardjs rules (https://standardjs.com/rules) for the linternpm run test to run the Vitest suite (unit/locale checks)If you intend to contribute on a regular basis, let us know so we can add you to the maintainer team.
V7 is changing significantly the way to integrate and customize SVGEdit. You can have a look at index.html to see how you can insert a div element into your HTML code and inject the editor into the div.
Warning: This div can be positioned anywhere in the DOM but it must have a numeric width and a numeric height (i.e. not 'auto' which happens when the div is hidden)
…You can just use the underlying canvas and use it in your application with your favorite framework. See example in the demos folder or the svg-edit-react repository.
To install the canvas:
npm i -s '@svgedit/svgcanvas'
you can then import it in your application:
import svgCanvas from '@svgedit/svgcanvas'
Development and Continuous Integration are done with a Chrome environment. Recent versions of Chrome, FireFox, and Safari are supported (in the meaning that we will try to fix bugs for these browsers).
To support old browsers, you may need to use an older version of the package. However, please open an issue if you need support for a specific version of your browser so that the project team can decide if we should support it in the latest version of SVGEdit.
A sample React component was used to build a SVGEdit extension.
To activate:
userExtensionssvgEditor.setConfig({
allowInitialUserOverride: true,
extensions: [],
noDefaultExtensions: false,
userExtensions: ['./react-extensions/react-test/dist/react-test.js']
})Cannot change colours of or edit imported SVG images
nodes in the path do not line up with the drawing, Inkscape doesn't see the path
element disappears if placed over previously filled shape and you move the new element
Invalid position of the selection box (adorner) when double clicked element to be edited.
Adding assets to an extension
Supporting the mult-line text control
How to create multiple instances of SvgCanvas?
[Feature Request] Options to set geometry precision and transform precision
Feature request: Typescript definitions
Docs are confusing - do we support svgedit-config-iife.js/svgedit-config-es.js configuration mechanisms?