Contents
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: current status
some movies which show what you can do with svg-edit
some images which where drawn with svg-edit
Installation
You need moin-1.9. If you are a developer you can use a clone of the mercurial repo. Before installation please read 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 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 2010-08-13 18:19:51
Hello, What could be the problem when i cannot save my drawings ? -- DuffDave 2011-05-28 13:31:53 You have a save dialog? and the editor did not close after selecting it? or do you see export instead of save? -- ReimarBauer 2011-05-28 16:22:18 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 2011-05-30 21:30:32 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 2011-05-30 22:32:51 Hello! I run my wiki completly over https, everything works, but not svgedit ? Are there known any problems? -- -- 131.188.23.138 2011-07-27 19:59:30