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

svg-editor_current_css.png

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,

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

-- TakeoKatsuki 2010-08-13 18:19:51

MoinMoin: ReimarBauer/SvgEditor (last edited 2013-07-24 21:54:24 by 10)