svgedit icon indicating copy to clipboard operation
svgedit copied to clipboard

'noDefaultExtensions' config option is not respected

Open luber opened this issue 2 years ago • 0 comments

Describe the bug When 'noDefaultExtensions' config option is set to true - the editor still loads default extensions.

To Reproduce Steps to reproduce the behavior:

  1. Edit src/editor/index.html and change noDefaultExtensions parameter to true:
svgEditor.setConfig({
          allowInitialUserOverride: true,
          extensions: [],
          noDefaultExtensions: **true**, // <-- this changed to true
          userExtensions: [/* { pathName: './react-extensions/react-test/dist/react-test.js' } */]
        });
  1. npm start
  2. See that default extensions are still loaded

Expected behavior If noDefaultExtensions is set to true - default extensions must not be loaded. The editor should load only those extensions that are listed in the config extensions property. E.g. this config:

svgEditor.setConfig({
          allowInitialUserOverride: true,
          noDefaultExtensions: true,
          extensions: [
            'ext-panning',
            'ext-eyedropper'
          ]
        });

should load 'ext-panning' and 'ext-eyedropper' extensions only.

SVG-Edit environment (IMPORTANT)

  • File for SVG-Edit: index.html
  • Version: 7.3.0
  • Protocol: http

Desktop (please complete the following information):

  • OS: MacOS
  • Browser Chrome
  • Version 108.0.5359.94

luber avatar Dec 04 '22 22:12 luber