Extension talk:SVGEdit

This extension is awesome but is there a way to create a new svg from scratch without having to upload one? That's the killer missing feature.. --Alterego 02:29, 16 December 2010 (UTC)


 * It should indeed be possible to add that. :D --brion


 * Apply this simple patch and it will be possible. Brion, could you include this patch into trunk? --VitaliyFilippov 17:53, 9 March 2011 (UTC)
 * Looks like this duplicates the recent work adding a button to the edit toolbar to create a new file... or is the idea to show on non-existing File: pages so it then saves to that file? --brion 19:47, 9 March 2011 (UTC)
 * Yeah, the idea is to show the button on non-existing File: pages. Patch fixes some js errors and uses #mw-imagepage-nofile as placeholder for SVGEdit, plus text on the button is changed so it tells about creating a new file. --VitaliyFilippov 17:15, 19 March 2011 (UTC)
 * Actually that's quite clever. :D I'll peek it over when my MW time permits... --brion 18:50, 21 March 2011 (UTC)

No note in Special:Version?
Would it be possible to have the next version of the editor include a line in Special:Version? I had been trying forever to verify whether the extension installed properly or not, because I did not see anything in the Version list.

Thanks!

--Peter


 * If you have installed the extension, there will indeed be a line in Special:Version. (If you have set up a local gadget, then there won't be.) --brion 18:49, 29 August 2011 (UTC)

Integration with WikiEditor
I am having real trouble in getting this extension to work. I cannot see the new button in WikiEditor that the documentation says should appear. To be clear, I have completed the following steps:


 * 1) Extracted the extension to the extensions/SVGEdit directory so that in that directory svgedit.php exists.
 * 2) Added require_once("$IP/extensions/SVGEdit/SVGEdit.php"); to my LocalSettings.php
 * 3) Added the line $wgFileExtensions[] = 'svg'; to LocalSettings.php to "enable SVG support"  I hope that was the right thing to do.

Is there anything else I need to complete to make the extension work? I feel I must be missing something obvious.


 * What version of MW are you running? --brion 18:35, 28 November 2011 (UTC)
 * 1.17 - I am using a Bitnami stack, at the time it was 1.17 but I see that they have updated to 1.18 on their website.

YEY!!! I fixed my own problem!!!


 * Upgraded to 1.18
 * Upgraded WikiEditor to the 1.18 version

Bish bash bosh - an icon appeared on the toolbar to begin creating SVG diagrams!

Missing instructions for installing svg-editor
When I follow the instructions exactly, using MW 1.18.1, I get the following message when using the WikiEditor button for creating an new SVG: The requested URL /wiki/extensions/SVGEdit/svg-edit/svg-editor.html was not found on this server. Although it may be foggily implied, there's nothing in the installation instructions that says we need to install an svg-editor, nor where.

65.110.153.40 21:46, 14 May 2012 (UTC)

Me2 Am I missing something? --2001:980:331A:1:225:22FF:FE7D:8A27 15:01, 14 June 2012 (UTC)
 * Found it, svgedit itself is definitely a different/bigger kettle of fish, and needs to be downloaded separately. --2001:980:331A:1:225:22FF:FE7D:8A27 16:13, 14 June 2012 (UTC)

No links?
Currently SVGEdit does not allow users to add IRI's (URI's) to objects. Isn't it supposed to be a wiki? ;-) --2001:980:331A:1:225:22FF:FE7D:8A27 16:13, 14 June 2012 (UTC)

I know this is stupid and kind of bikeshed-y, but
the name "SVGEdit" is super-roboty. I wonder if the extension wouldn't attract more attention/love if it were named something else. I'd really like to see this extension live on Wikimedia wikis, but it may need a bit of sex appeal to get resources. Just a thought. --MZMcBride (talk) 01:01, 17 November 2012 (UTC)


 * VectorFlow? ;) --brion (talk) 01:38, 17 November 2012 (UTC)

Error saving file
I have the SVG-editor button in the advanced toolbar, the latest stable editor is installed, and SVG-edit opens and I can start drawing. However, I cannot save the new drawing, but get this error message in a small dialog box when I hit the Save and close button:

"Error saving file"

Suggestions?

-After i search, i just change the access for image file into 770 or 777 for the image folder. Then it will create folder "lockdir". Then it will show empty images, after that we can embedded files that can be view at list of uploaded files. -At my case, it will be take error at create thumbnails. And i still search for solution. Thank you--Sephirothindra (talk) 06:27, 20 June 2013 (UTC)

-Ups for Error Create thumbnails, it resolved with update of PHP version 5.4.5 (apache2handler). But for svg-editor it still there is a bug when we create arrow, it will goes not in place.--By Sephirothindra 07:02, 27 June 2013 (UTC)

Cannot get it to work with MediaWiki 1.22
I installed svg-edit (latest - 2.6) and installed SVGEdit (latest - "snapshot of version 56294d9"), updated my LocalSettings (of course), and added '.svg' to the list of allowed file types. I also disabled the use of external renderers for creating thumbnails - forcing MediaWiki to use the SVG as-is and not create any PNG, etc.

I created a trivial SVG test image using svg-edit (the very version that I downloaded) and saved the file.

I uploaded the test image file to my MediaWiki instance (1.22). The Files: page lists the file and shows the preview properly - all good so far. When I click on the entry for the uploaded SVG file, there is an "Edit Drawing" button as expected. When I click on it, svg-edit starts to open: it displays the svg-edit user interface, BUT it is grayed out, and contains a swirling progress circle that swirls forever. The permissions on my MediaWiki images directory are 777.

Any thoughts?

-- Possible reply

Hello, Do you have modified your SVGEdit extension (file SVGEdit.php) to tell that you are using your local svg-edit, and not the remote one delivered by google ?

Example: $wgSVGEditEditor = "/svg-editor.html";

SVGEdit extension and svg-edit.2.7: Unable to save image
April 2014: svg-edit 2.7 has been released (https://code.google.com/p/svg-edit/wiki/VersionHistory) This new version brings several enhancements and solves many issues including one encountered when drawing objects with Firefox (wrong calc on mouse x/y within svgcanvass). Unfortunately, after installing and configuring the new version of svg-edit the "save and close" button doesn't work: - after clicking the "save and close" button (#mw-svgedit-save) the spinnerOn function enables the spinner, the svgedit.getSvgString functions seems to be properly overwritten with the callback function "function(svg)" but the svg variable (which should contain the svg data) has no value. (I tried to debug/giggle a bit in the code but I was unable to find out exactly the root cause.. not sure if the problem is with jquery, or the svg variable or the native svg-edit function changes..)

- I think this is related, but I cannot use the plugin at all using svg-edit 2.7, 2.6 and MW 1.23. I just get the spinning box and it never "loads". The svg-edit utility is fully loaded in the background, including a previous edit (from loading it manually outside of this extension). It looks like the extension never successfully opens the svg to modify in the svg-edit frame. - Lee

- It seems that for svg-edit-2.7 the callback returned by getSvgString never fires and it therefore never uploads anything. Furthermore the default configuration changed such that a dialog is presented to choose a browser-local storage. If answered with yes, svg-edit loads the image data from the storage, even though the file I tried to edit did not exist at all. This suggests that the loading also does not work. --Dev-zero (talk) 12:51, 5 August 2014 (UTC)

- The message passing API has changed in 2.7. Just copy the file embedapi.js from svg-edit 2.7 to modules/ext.svgedit.embedapi.js in the SVGEdit directory and it will work. I've tested this on MW 1.23. --Andreas Jonsson (talk) 16:53, 23 May 2015 (UTC)

Hard to set up cross-origin and damages SVGs
Tried it.
 * 1) First, I had to update the embed API.
 * 2) Then, the svg-edit static host had to be configured a) not to be abused b) to allow the origin it is used on.
 * 3) Finally I had again to patch the extension to make it communicating with the static host.

All acceptable if it would work as expected but unfortunately svg-edit seems to have some bugs damaging SVGs. Otherwise awesome software that just needs a bit of UI-polishing. -- Rillke (talk) 13:45, 4 July 2014 (UTC)

Grayed-out, just spins
I've tried every combination I can think of, latest mediawiki (25.1), latest svg-edit, latest version of the extension, previous versions of everything (except mediawiki), both local and remote, but, though SVGEdit runs and renders, the screen remains grayed-out, with the spinning icon in the middle.

Any suggestions? Does this work out-of-the box with current everything?