

Add
if(mw.config.get('wgNamespaceNumber')===6&&/SVG/i.test(mw.config.get('wgTitle').slice(-3)))// SVGedit on SVG files onlyimportScript('User:Rillke/SVGedit.js');
Add
if(mw.config.get('wgNamespaceNumber')===6&&/SVG/i.test(mw.config.get('wgTitle').slice(-3)))// SVGedit on SVG files onlymw.loader.load('//commons.wikimedia.org/w/index.php?title=User:Rillke/SVGedit.js&action=raw&ctype=text/javascript');
tom:Special:MyPage/global.js.Make sure you remove any imports of this script at Wikimedia Commons before enabling global import, i.e. check yourSpecial:MyPage/common.js andSpecial:MyPage/vector.js that you do not import the script there.
Click on "edit SVG" in theTools-box (on the left hand side of the SVG file page).
There is a buggy one, which can be enabled through loadingUser:Rillke/SVGEdit-WYSIWYG.js
I do not recommend editing an upload which a lot of people rely on using this script. Also it's heavy, hosted on a server which might be compromised or down in the near future. Basically it's a preview ofmw:Extension:SVGEdit.
Hallo Rainer,
gibt's eigentlich eine (mit vertretbarem Aufwand realisierbare) Möglichkeit irgendwie den CodeEditor für das Eingabefeld zu nutzen? Wenn das funktionieren würde, dann wäre es einfach einsame Spitze!
Viele Grüße, --Patrick87 (talk)20:20, 4 February 2015 (UTC)
Für Gelangweilte: Code schreiben, der erkennt, welche Art von Einrückung (1 Tab, 1 Space, 2 Spaces, …) eine SVG-Datei benutzt und mir diese zurückliefern. Dann könnte ich den CodeEditor automatisch konfigurieren lassen, so dass neue Zeilen gleich richtig eingerückt werden. --Rillke(q?)22:41, 21 May 2015 (UTC)
Sorry I have no intention to keep using it but here's my little thought after my first try: When I activate CodeMirror, it slowed down my old PC but I couldn't find option to revert to the bare (faster) editor. --Sameboat - 同舟 (talk ·contri.)04:55, 11 June 2015 (UTC)
Eine Vorschau wäre übrigens auch Klasse... (Hau micht nicht gleich, ich weiß, dass das ein Haufen Arbeit ist.
)
Soll jetzt auch keine Aufforderung sein, lediglich als Idee und Ideen in den Raum werfen kostet ja erstmal nichts. Wenn die dann irgendwann irgendjemand irgendwie umsetzt haben wir alle was davon! --Patrick87 (talk)21:55, 20 March 2015 (UTC)
sandbox Attribut für den<iframe> unterstützt). Hier scheint Firefox den Hintergrund/Fills aus einem mir noch nicht bekannten Grund nicht zu rendern. Hinweise diesbezüglich werden gern entgegengenommen. --Rillke(q?)22:37, 21 May 2015 (UTC)<iframe> unterstützt derzeit keinexlink:href's und ähnliches (z.B. Marker), siehe z.B.File:5-Elemente 3.svg. Kann man daran was ändern?$(function(){setTimeout(function(){$('#ca-history').append($('#e-edit-raw-SVG'));},100);});// Hack for alternative button
setTimeout is. I'll try finding a workaround, once I had a dropdown at the edit button. --Rillke(q?)13:38, 16 September 2015 (UTC)A button which allows importing a revision from the local file system is coming soon. Stay tuned. --Rillke(q?)13:41, 16 September 2015 (UTC)
Hallo Rilke!
Kannst du dir bitte mein common.js in meinem en.wiki anschauen und mir sagen warum es nicht funktioniert:https://en.wikipedia.org/wiki/User:JoKalliauer/common.js
Hier ein Screenshot:http://photobucket.com/gallery/user/Jo-Kalliauer/media/bWVkaWFJZDoxMzMxMzQ1Nzc=/?ref=
Ich hab alle Einstellungen im en.wiki auf die Standarteinstellungen gesetzt.
— JohannesKalliauer -Talk |Contributions08:05, 24 March 2018 (UTC)
TodayI tried to use the script for editinga file which contained—unknowingly to me—an <image … sodipodi:absref="C:\Documents and Settings\…" xlink:href="…"/> element. It is a condition throwing a warning on attempted uploading to Commons nowadays. The SVG editor form did not show me any error on [Save] and the reason why the file was not updated remained a mystery to me untilI resorted to the standard uploading form. Can a smarter handling of warning and error messages from the server be implemented?Incnis Mrsi (talk)20:06, 10 April 2018 (UTC)
ERROR in <image> with id=image30664: Image has xlink:href with external source. They will not work (and may be blocked) by the Wikimedia software. All required elements need to be included into the SVG directly. Seehttps://phabricator.wikimedia.org/T5537 for details.
importScript('User:Perhelion/simpleSVGcheck.js'); on yourUser:Incnis_Mrsi/common.js (Maybe copy myUser:JoKalliauer/common.js and delete those you don't like)style="display:none" therefore commenting out was the best choice, because it should not displayed anyway (Ps it isFile:Un-cyprus.png)Hi
Not important at all, but since I (and I suspect others) use this cross-wiki, loading fromglobal.js at meta, you might want to change:
Editing SVG source code usingUser:Rillke/SVGedit.js; upload handled byUser:Rillke/MwJSBot.js
to
Editing SVG source code usingc:User:Rillke/SVGedit.js; upload handled byc:User:Rillke/MwJSBot.js
or similar. Cheers. --Begoon06:45, 16 June 2019 (UTC)
Should SVGEdit provide Diffs between file revisions so you can more easily see/audit the changes? --Rillke(q?)11:36, 27 July 2019 (UTC)
{{Editrequest}}As I've said onUser_talk:Rillke/MwJSBot.js. Please replacemw.user.tokens.get('editToken') withmw.user.tokens.get('csrfToken'). Thanks.Masum Reza📞20:39, 13 October 2019 (UTC)
Hello!
Is there a good way to crop SVGs using this tool (or perhaps another tool)? For exampleen:File:Logo-riverside.svg.Jonteemil (talk)17:05, 12 February 2020 (UTC)
@Rillke: Hello! The tagrillke-mw-js-bot appears in the edit diff, see for exampleSpecial:Diff/412407998 here on Commons. This tag however, does not appear on enwiki (or any other wiki I would presume), see for examplew:Special:Diff/950525997. Can you make it so it does? This is because I don't thinkthis tool can recognize edits done withUser:Rillke/SVGedit.js otherwise. Best regards,Jonteemil (talk)02:32, 20 April 2020 (UTC)
Whenever I click the Edit SVG button the code window is only two lines high. So I have to resize the window each time. Is that intentional or is it on my end? It's only an annoyance -- the script works great. –Fredddie™23:03, 24 May 2020 (UTC)
To generate an RSVG preview, this script makes a request tohttps://tools.wmflabs.org/convert/svg2png.php. However, this endpoint has now moved tohttps://convert.toolforge.org/svg2png.php with a 308 redirect. Because this is a cross-origin redirect, the browser considers the origin to be tainted, and sets the headerOrigin: null the second HTTP request. Not including a proper origin causes svg2png.php to return a 403 Forbidden error. Thus, this script needs to be updated to use the new URL. –IagoQnsi (talk)23:00, 11 July 2020 (UTC)
{{Editrequest}}It seems thatUser:Rillke is not very active these days, so could an admin please fix this instead? The fix is very straightforward: on line 659 of this script,//tools.wmflabs.org/convert/svg2png.php needs to be changed to//convert.toolforge.org/svg2png.php.(Edit: domain fix bySperavir 01:49, 29 July 2020 (UTC).) Thanks,IagoQnsi (talk)18:50, 16 July 2020 (UTC)
tools.wmflabs.org usage, just now in line 530://tools.wmflabs.org/validator/w3.php should be changed to//validator.toolforge.org/w3.php. Maybe both could even be spended a leadinghttps:, too, because there won’t be a successful http request (oh, seems to be redirected). — Speravir – 01:21, 29 July 2020 (UTC){{Edit request}}In the moment this script does not work with SVG files containing an upper case letters extension (example:File:StopSign.SVG). Apparently, this line has to be altered (for now line 45)
if(conf.wgNamespaceNumber!==6||!/\.svg$/.test(conf.wgPageName))
Adding an i for the regex should work, it’s already done this way later in the script (now line 270).
Suggestion: Change this line to
if(conf.wgNamespaceNumber!==6||!/\.svg$/i.test(conf.wgPageName))
Alternatively, for both cases the regex could be changed to/\.(svg|SVG)$/
— Speravir – 00:59, 29 July 2020 (UTC)
The following gallery of SVG Tools have been gathered by a very popular CSS blogger and his community :
There are very interesting, light weight, in browser proof of concepts worth checking.Yug20:04, 18 September 2020 (UTC)


Tools to Visualize and Edit SVG Paths (Kinda!) displays few cases of very interesting, light weight, in browser proof of concepts to edit basic svg shapes in browser via nodes dragging.This one by Thebabydino is demoing core principles of what we do need. The wish is expressed by CSS-tricks is similar to our need and as follow :
It was brought up at theSVG Summit the other day, wouldn’t it be nice when working with SVG to be able to work with it both ways at once?
There might not be the perfect one true tool, but there are certainly some ideas getting there! |
Mission statement: Allow editing of Commons SVG's basic shapes via nodes-dragging without having to save them locally (aka "download") them, edit them locally, then upload them back to Commons.
The IRL/Wikimediause case I see is to allow Commons users ...
@Rillke andSarang:, others: does such project exist already on Commons ? Such project could worthmeta:Grants:Project. This would have similar ecosystem role asmeta:Community_Tech/SVG_translation (app) : speed up community's users in their work improving svg contents. The UI and .js library produced would also be appreciated by the overall Opensource community. cc:user:NKohli (WMF)Yug20:04, 18 September 2020 (UTC)
When starting the SVG editor while having the 2017 wikitext editor installed, it loads the latter instead.pandakekok912:22, 19 April 2021 (UTC)
I installed the script, clicked the edit button and didn't get a dropdown. Clicking the edit text just opens the normal editor, hovering on the button doesn't do anything and it isn't appearing in the tools section. I checked and it shows up in both locations on the legacy version of Vector.Remagoxer (talk)11:52, 27 July 2021 (UTC)
AsFredddie reported above, the textarea with the SVG code is only about 2 lines high. On a PC browser, I can resize it, but not on Chrome on Android. Is there a way to configure how many lines appear? Thanks,cmɢʟee ⋅τaʟκ20:25, 27 July 2021 (UTC)
}).css({width:'99%'}).appendTo($taWrap),
}).css({width:'99%',height:'40em'}).appendTo($taWrap),
Hey, I saw that you shaded in Skagit County, Washington differently in the 2020 Washington gubernatorial election to reflect write-ins. I was wondering if you could upload a new version of the 2016 gubernatorial map with Pierce County being plurality Democratic and Wahkiakum County being less than 60% Republican. Source:https://uselectionatlas.org/RESULTS/state.php?fips=53&year=2016&f=0&elect=0&off=5 Thanks.Thomascampbell123 (talk)07:52, 21 December 2021 (UTC)
I have prototyped a smallJS translation tool. Do you think something like that might be useful to be merged into SVGedit?
I had issues with the existing SVG Translate Tool and really like your helper here, instead of downloading/uploading. Let me know what you think. --Aeroid (talk)17:45, 22 December 2021 (UTC)
I've tried tried it with a few different SVGs. The RSVG rendering is not working when previewing.File:Bug blank.svg is showed instead.Jonteemil (talk)22:55, 23 August 2022 (UTC)
I've been trying to use this script like I've done several times before. But now, the drop-down list isn't there at all. So, I am unable to use it any further. What went wrong suddenly? —CX Zoom(A/अ/অ) (let's talk|contribs)08:04, 29 August 2022 (UTC)
When I try to use it onFile:Sniper red beta.svg, it givesAPI Error fileexists-shared-forbidden: A file with this name exists already in the shared file repository. If you still want to upload your file, please go back and use a new name. [[File:Sniper_red_beta.svg|thumb|center|Sniper_red_beta.svg]]
Isn't that the whole point of the tool? To write over eisting files???QuickQuokka[talk •contribs]03:43, 31 August 2023 (UTC)
I do not undestand the sentence:Click on "edit SVG" in the Tools-box (on the left hand side of the SVG file page).I cannot find the "Tools-box". How does it look? should I clik on somthing?Thanks a lot, Rami (Aizenr,talk)04:16, 3 October 2024 (UTC)
Hi dear, please create SVG file forthis flag. Thank you!Kehaa (talk)11:04, 3 August 2025 (UTC)