From baa68718c886609c7833b6c06118b9de8a62d045 Mon Sep 17 00:00:00 2001 From: szerintem Date: Mon, 21 Apr 2025 09:57:58 +0200 Subject: [PATCH] fix the order of config() and init() in readme (#1049) --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 90a11d17..4f7488a0 100644 --- a/README.md +++ b/README.md @@ -89,8 +89,6 @@ V7 is changing significantly the way to integrate and customize SVGEdit. You can import Editor from './Editor.js' /* for available options see the file `docs/tutorials/ConfigOptions.md` */ const svgEditor = new Editor(document.getElementById('container')) - /* initialize the Editor */ - svgEditor.init() /* set the configuration */ svgEditor.setConfig({ allowInitialUserOverride: true, @@ -98,19 +96,21 @@ V7 is changing significantly the way to integrate and customize SVGEdit. You can noDefaultExtensions: false, userExtensions: [] }) + /* initialize the Editor */ + svgEditor.init() ``` ## I want to build my own svg editor 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. +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: +you can then import it in your application: `import svgCanvas from '@svgedit/svgcanvas'`