#pragma supplementation-page on <<TableOfContents>> = Introduction = svg-edit is a lightweight, web-based, Javascript-driven SVG editor that works in any modern browser. For IE one has to install the add on chromeframe. Initial version of svg-edit Revision r1502 (http://code.google.com/p/svg-edit/) used for this action. For moin-1.9 as SvgEdit added to the extension repo There is still something to do: [[http://hg.moinmo.in/moin/extensions/file/tip/htdocs/svg-edit/CHANGES.current|current status]] {{attachment:svg-editor_current_css.png}} == some movies which show what you can do with svg-edit == * [[http://tinyvid.tv/file/2tbf9gddalxmh.ogg|screen cast svg-edit 2.3]] * [[http://www.youtube.com/watch?v=zpC7b1ZJvvM|SVG-Edit 2.4: Part 1 of 2]] * [[http://www.youtube.com/watch?v=mDzZEoGUDe8|SVG-Edit 2.4: Part 2 of 2]] == some images which where drawn with svg-edit == * [[http://vertex.corpsmoderne.net/main.php?g2_itemId=114|SVG drawings by wormsxulla]] ##(!) I will package it again after some issues are solved from me and others ##= Super easy Installation = ##This is a snapshot of moin-1.9.1 and !SvgEditor (svg-edit) from the extension repo. ##[[attachment:moin-1.9.1_and_extension_svg-edit.tgz]] ##md5sum {{{ ##775f6da489c6f91587295d0868ca9730 moin-1.9.1_and_extension_svg-edit.tgz }}} ##The SvgEditor action was copied to the wiki's plugin dir. And the static files to the moins static files. ##Also all english help and system pages of underlay were installed. A navigation tab for the Examples was added. ##For installation please read [[http://moinmo.in/InstallDocs#quick|quickinstallation guide]] (1 minute) ##For testing purposes just do the 1 minute quickinstallation. ## 1. Unpack the !MoinMoin release archive ## 1. Run wikiserver.py from the top level directory. ## 1. Point your browser at http://localhost:8080/ ## 1. You are done! Have fun! :) ##{{{ ##http://localhost:8080/Examples ##http://localhost:8080/MyTestPage?action=SvgEditor&target=Example.svg ##}}} ##If you want it easier to exchange some of the code, see below: = Installation = You need moin-1.9. If you are a developer you can use a clone of the mercurial repo. Before installation please read [[http://.moinmo.in/InstallDocs#quick|quickinstallation guide]] (1 minute) svg-edit is a plugin we have added to the moin extension repository. Save http://hg.moinmo.in/moin/extensions/archive/tip.tar.bz2 to the moin-1.9 directory and unpack it. {{{ cd Where_You_have_the_moin-1.9.x wget http://hg.moinmo.in/moin/extensions/archive/tip.tar.bz2 tar ixvf tip.tar.bz2 mv extensions-ad5213d60ae5 extensions }}} (!) the "-hex number" can change. It depends on the revisions. = configuration = To enable svg-edit currently we have to do the following steps. We need to add an extension dir to the wikiconfig.py file and we have to set a link for serving static files. == wikiconfig == Since moin-1.9.0 you can add. {{{ diff -r a58fbb06ead6 wikiconfig.py --- a/wikiconfig.py Thu Oct 08 23:23:15 2009 +0200 +++ b/wikiconfig.py Thu Oct 08 23:38:53 2009 +0200 @@ -15,6 +15,9 @@ # vvv DON'T TOUCH THIS EXCEPT IF YOU KNOW WHAT YOU DO vvv # Directory containing THIS wikiconfig: wikiconfig_dir = os.path.abspath(os.path.dirname(__file__)) + extensions_dir = os.path.join(wikiconfig_dir, 'extensions/data/plugin') + plugin_dirs = [extensions_dir] + # We assume this structure for a simple "unpack and run" scenario: # wikiconfig.py @@ -43,6 +46,18 @@ # Add your configuration items here. secrets = 'This string is NOT a secret, please make up your own, long, random secret string!' + extensions_mapping = { + # file extension -> do -> action + '.tdraw': { + 'modify': 'twikidraw', + }, + '.adraw': { + 'modify': 'anywikidraw', + }, + '.svg': { + 'modify': 'SvgEditor', + } + } # DEVELOPERS! Do not add your configuration items there, }}} == link == In the moin-1.9.x/MoinMoin/web/static/htdocs you have to set a link to the svg-edit static files {{{ ln -s ../../../../extensions/htdocs/svg-edit/ }}} {{{ $: ls -l . . svg-edit -> ../../../../extensions/htdocs/svg-edit/ }}} = Start it = {{{ cd moin-1.9.x ./wikiserver.py }}} {{{ http://localhost:8080/MyTestPage?action=SvgEditor&target=Example.svg }}} also you can add on a wiki page the drawing syntax {{{ {{drawing:Example.svg}} }}} = Discussion = * Is there any plan to update this to svg-edit 2.5? I hope that the "save problem" (Issue 535) is resolved in 2.5. . ''I will update the 1.9 version to 2.5 or 2.6 later. Meanwhile I have added it to moin-2.0 but there it needs also a refactoring (will do this in the next days, so you can try it on the [[http://test.moinmo.in:8080/MoinMoin2|testwiki]]).'' * Hi Reimar, any updates for this? I am looking forward to it. Thanks! * Does this work with Google Chrome? In my environment, I cannot save an image when I use Chrome on Windows 7. . ''I don't know. I think yes, because with the chromeframe plugin it works for ie8'' * With Firefox, I can save images but cannot edit an image from a wiki page. I have to go to the attachment page to edit the image. Is this the way it works? . ''Yes, In moin-2.0 every item has its own modify dialog. So the click on edit feature of twdraw and awdraw of 1.9 is deprecated. You can add an edit action by the Action macro in 1.9'' . When I select SvgEditor from "More Actions:" it says "Empty target given". What should I do make it work? . ''append &target=foo.svg'' ''I should have written the action lowercase because then it would be invisible from the more actions menu'' -- TakeoKatsuki <<DateTime(2010-08-13T10:19:51-0800)>> * Hello, What could be the problem when i cannot save my drawings ? -- DuffDave <<DateTime(2011-05-28T13:31:53Z)>> You have a save dialog? and the editor did not close after selecting it? or do you see export instead of save? -- ReimarBauer <<DateTime(2011-05-28T17:22:18+0100)>> I can save the image only in Firefox4 (not in Chromium11). If I click on Save the editor close and i get to the Site (In Chromium happens nothing). But if I am logged in nothing happens although i use firefox. -- DuffDave <<DateTime(2011-05-30T21:30:32Z)>> I correct myself: The Problem is the ReverseProxy my Wiki is on. How can i configure the ReverseProxy for MoinMoin right, so if i ask for https on the proxy, the proxy asks to the wiki-machine with https ? -- DuffDave <<DateTime(2011-05-30T22:32:51Z)>> Hello! I run my wiki completly over https, everything works, but not '''svgedit''' ? Are there known any problems? -- -- 131.188.23.138 <<DateTime(2011-07-27T19:59:30Z)>>