DokuWiki-Plugin-SVGEdit icon indicating copy to clipboard operation
DokuWiki-Plugin-SVGEdit copied to clipboard

Could not get svg-edit-3.0.0 to work locally

Open simon-r-white opened this issue 6 years ago • 4 comments

Using this plugin locally, I can get it to work with svg-edit-2.8.1, but when I download unzip svg-edit-3.0.0 the plugin seems to not work.

Within the svgedit-3.0.0.zip file, the folder I believe I needed to copy into /lib/plugins/svgedit was the editor folder (that contains the svg-editor.html file referenced in the third line of this plugin's script.js file).

I don't seem to get any visual errors within Dokuwiki, just a blank page.

simon-r-white avatar Oct 22 '18 14:10 simon-r-white

Not sure, but @AlanZheng was recently changing something to newer api. See #27

Harvie avatar Oct 22 '18 14:10 Harvie

I've just pulled in the lastest svg-edt (version 3.1.0) and made the change as per #27, but I sill could not get the editor to appear.

I've reverted back to svg-edit-2.8.1, will try experiment sometime when I can set up a testing wiki.

simon-r-white avatar Oct 24 '18 10:10 simon-r-white

I see the editor: With version 3.2.0 (offline install): git clone https://github.com/SVG-Edit/svgedit.git lib/plugins/svgedit/svg-edit edit script.js to show: var svgeditor_path = DOKU_BASE+'lib/plugins/svgedit/svg-edit/editor/';

Now, still unable to save SVG: in firefox console: ReferenceError: EmbeddedSVGEdit is not defined … (https://…/plugins/svgedit/svg-edit/editor/embedapi.js has been loaded)

dgeo avatar Nov 07 '18 15:11 dgeo

I also had the error

export declarations may only appear at top level of a module

I didn't understand how to fix this, so I commented the problematic export and it did the trick.

The full quick & dirty fix (works offline with SVG-Edit 4.20):

  • git clone https://github.com/SVG-Edit/svgedit.git lib/plugins/svgedit/svg-edit
  • in script.js, var svgeditor_path = DOKU_BASE+'lib/plugins/svgedit/svg-edit/editor/';
  • in lib/plugins/svgedit/svg-edit/editor/embedapi.js, comment the last line // export default EmbeddedSVGEdit;

Everything is working fine except for the initial image loading, but the "TXT->SVG" button works.

Grumph avatar Jan 13 '19 12:01 Grumph