Go to file
Agriya Dev5 deafb994cf #98 extension connectors i18n translate changes 2021-05-18 18:42:29 +05:30
.github fix tests and configuration files 2021-05-09 20:51:26 +02:00
archive update master to V7 2021-05-09 19:29:45 +02:00
badges update master to V7 2021-05-09 19:29:45 +02:00
cypress Update scenario.js.snap 2021-05-15 17:55:21 +02:00
demos fix access to images for the minimal demo 2021-05-15 21:53:22 +02:00
docs fix some useless console.log 2021-05-15 16:20:13 +02:00
src #98 extension connectors i18n translate changes 2021-05-18 18:42:29 +05:30
tools enforce a few eslint rules 2021-05-13 01:00:09 +02:00
.editorconfig - Docs: Update testing info; update CHANGES 2020-02-20 12:31:06 +08:00
.eslintignore Refactor canvas in multiple pieces to increase maintainability (#446) 2020-11-11 11:38:45 +01:00
.eslintrc.js merge poly/star into a single extension 2021-05-15 17:48:53 +02:00
.gitignore fix tests and configuration files 2021-05-09 20:51:26 +02:00
.npmignore remove unused travis.yml 2020-09-20 00:21:19 +02:00
.remarkrc - Linting (Markdown): Fix linting format 2018-10-19 15:19:18 +08:00
AUTHORS - docs: update Pavol's email address 2020-02-15 13:20:32 +01:00
CHANGES.md adapt to new folder structure 2020-07-25 15:32:59 +02:00
CODE_OF_CONDUCT.md prepare requirements for netlify 2020-09-13 12:44:35 +02:00
FUNDING.yml - Add name to FUNDING.yml 2020-09-17 10:28:36 +08:00
LICENSE-MIT.txt - Linting (HTML): Use double-quotes for attributes, remove redundant `type=text/css`, 2018-05-13 09:58:13 +08:00
README.md allow 6.1.0 from netlify 2021-05-15 19:54:43 +02:00
babel.config.json fix issue with storage 2020-09-09 01:35:47 +02:00
composer.json - docs: update Pavol's email address 2020-02-15 13:20:32 +01:00
cypress.json update master to V7 2021-05-09 19:29:45 +02:00
lgtm.yml - Build: Fix build input for xdomain; update external files per latest 2020-08-05 18:38:52 +08:00
licenseInfo.json update master to V7 2021-05-09 19:29:45 +02:00
mocha-multi-reporters.json - Testing: Remove extra `spec` 2020-01-06 14:45:53 +08:00
netlify.toml #97 update from master svgedit 2021-05-18 16:44:50 +05:30
nyc.config.js update master to V7 2021-05-09 19:29:45 +02:00
package-lock.json #97 update from master svgedit 2021-05-18 16:44:50 +05:30
package.json upg 2021-05-15 00:23:53 +02:00
rollup.config.js enforce a few eslint rules 2021-05-13 01:00:09 +02:00
web-dev-server.config.mjs add more linter warnings 2021-05-14 23:28:12 +02:00

README.md

SVG-Edit

npm Dependencies devDependencies

Tests badge Coverage badge

Known Vulnerabilities Total Alerts Code Quality: Javascript

Licenses badge

(see also licenses for dev. deps.)

issuehunt-to-marktext

SVG-edit is a fast, web-based, JavaScript-driven SVG drawing editor that works in any modern browser.

screenshot SVG

Help wanted

We need more maintainers for SVG-Edit

Demo

Try SVG-edit here

Thanks to netlify, you can test the following builds:

Try SVG-edit 5.1.0 here

Try SVG-edit 6.1.0 here

/

Installation

Quick install

  1. Clone or copy the repository contents (at least the editor directory). Please note that you should not do a recursive Git clone (i.e., with the --recursive or --recurse-submodules flags), as you will get assorted past versions (which are available on the parent as branches anyways). (The reason these past versions are available as submodules is merely for convenience in hosting these versions, along with master, online on Github Pages.)
  2. If you need programmatic customization, see its section below.
  3. Otherwise, just add an iframe to your site, adding any extensions or configuration (see docs/tutorials/ConfigOptions.md ([ConfigOptions]{@tutorial ConfigOptions})) within the URL:
<iframe src="svgedit/src/editor/svg-editor.html?extensions="
    width="100%" height="100%"></iframe>

Integrating SVG-edit into your own npm package

These steps are only needed if you wish to set up your own npm package incorporating SVGEdit. You will need to have Node.js/npm installed.

  1. Create and enter an empty folder somewhere on your desktop.
  2. Create your npm package: npm init (complete the fields).
  3. Install SVG-edit into your package: npm i --save svgedit.
  4. Look within node_modules/svgedit/, e.g., node_modules/svgedit/src/editor/svg-editor.html for the files your package needs and use accordingly (from outside of node_modules).
  5. If you want to publish your own work, you can use npm publish.

Programmatic customization

  1. If you are not concerned about supporting ES6 Modules (see the "ES6 Modules file" section), you can add your config directly to svgedit-config-iife.js within the SVG-Edit project root.
  2. Note: Do not remove the import svgEditor... code which is responsible for importing the SVG edit code. Versions prior to 3.0 did not require this, but the advantage is that your HTML does not need to be polluted with extra script references.
  3. Modify or utilize any options. See docs/tutorials/ConfigOptions.md ([ConfigOptions]{@tutorial ConfigOptions}).

ES6 Modules file

  1. svg-editor-es.html is an HTML file directly using ES6 modules. It is only supported in the latest browsers. It is probably mostly useful for debugging, as it requires more network requests. If you would like to work with this file, you should make configuration changes in svgedit-config-es.js (in the SVG-Edit project root).
  2. If you are working with the ES6 Modules config but also wish to work with the normal svg-editor.html version (so your code can work in older browsers or get the presumable performance benefits of this file which references JavaScript rolled up into a single file), you can follow these steps after any config changes you make, so that your changes can also be automatically made available to both versions.
    1. JavaScript:
      1. Run npm install within the svgedit directory (node_modules/svgedit if you installed via npm) and the root repository directory if you cloned the Git repository instead. This will install the build tools for SVG-edit.
      2. Run npm run build-by-config within the svgedit directory mentioned in the step above.
        1. This will rebuild svgedit-config-iife.js (applying Babel to allow it to work on older browsers and applying Rollup to build all JavaScript into one file). The file will then contain non-ES6 module JavaScript that can work in older browsers. Note that it bundles all of SVGEdit, so it is to be expected that this file will be much larger in size than the original ES6 config file.
    2. HTML:
      1. If you wish to make changes to both HTML files, it is recommended that you work and test on svg-editor-es.html and then run npm run build-html to have the changes properly copied to svg-editor.html.

Recent news

  • 2020-02-22 Published 6.0.0 License clarifications/updates, PDF export improvements, clipboard sessionStorage, and other changes.
  • 2019-11-16 Published 5.1.0 Misc. fixes and refactoring
  • 2019-05-07 Published 5.0.0 Change from @babel/polyfill
  • 2019-04-03 Published 4.3.0 Fix for double click on gradient picker droplets affecting some browsers and dragging control point of arc. Other misc. fixes. Some accessibility and i18n.
  • 2018-12-13 Published 4.2.0 (Chinese (simplified) and Russian locale updates; retaining lines with grid mode)
  • 2018-11-29 Published 4.1.0 (Fix for hyphenated locales, svgcanvas distributions)
  • 2018-11-16 Published 4.0.0/4.0.1 (Move to Promise-based APIs)
  • 2018-11-01 Published 3.2.0 (Update qunit to resolve security vulnerability of a dependency)
  • 2018-10-25 Published 3.1.1 (Fix for saving SVG on Firefox)
  • 2018-10-24 Published 3.1.0 (Redirect on modular page for non-module-support; versions document (for migrating))
  • 2018-10-22 Published 3.0.1 (Revert fix affecting polygon selection)
  • 2018-10-21 Published 3.0.0 (misc. improvements including centering canvas and key locale fixes since last RC)
  • 2018-09-30 Published 3.0.0-rc.3 with security and other fixes
  • 2018-07-31 Published 3.0.0-rc.2 with misc. fixes
  • 2018-07-19 Published 3.0.0-rc.1 allowing for extensions and locales to be expressed as modules
  • 2018-05-26 Published 3.0.0-alpha.2 with ES6 Modules support
  • 2017-07 Added to Packagist: https://packagist.org/packages/svg-edit/svgedit
  • 2015-12-02 SVG-edit 2.8.1 was released.
  • 2015-11-24 SVG-edit 2.8 was released.
  • 2015-11-24 Code, issue tracking, and docs are being moved to github (previously code.google.com).
  • 2014-04-17 2.7 and stable branches updated to reflect 2.7.1 important bug fixes for the embedded editor.
  • 2014-04-07 SVG-edit 2.7 was released.
  • 2013-01-15 SVG-edit 2.6 was released.

Videos

Supported browsers

- Opera 59+,
- IE 12+,
- Chrome 75+,
- FireFox 68+,
- Safari 10+

Support for old browsers may require 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
the project team can decide if we should support with the latest version.

Further reading and more information

Older references

Hosting

SVGedit versions are deployed to: Deploys by Netlify