On Fri, Jan 1, 2010 at 9:02 AM, Vincent Massol <[email protected]> wrote:
Might be interesting to integrate with XWiki: http://code.google.com/p/svg-edit/
Anyone interested?
It's not that hard to integrate, superficially, per http://blog.codedread.com/archives/2009/06/19/embed-an-svg-editor-on-your-we...: One of the nice things about hosting it on Google Code is that you can rig
the Subversion repositories to serve the proper MIME types of the files in question. This means we can have Google Code host the editor and just iframe it into our pages.
...
<iframe src=" http://svg-edit.googlecode.com/svn/tags/stable/editor/svg-editor.html" width="750" height="600"/>
Also http://www.hokstad.com/svg-editor-gadget-for-google-wave.html talks about integrating svg with google-gadgets for integration into wave: I've put together a very rough proof of concept for a shared graphics editor
gadget using SVG. I didn't write all of it myself, mind you. Jayesh Salvi started a discussion about SVG in Wave, and during that discussion he pointed us to an existing open source browser based SVG editor<http://code.google.com/p/svg-edit/> by Narendra Sisodiya <http://narendra.techfandu.org/> and Pavol Rusnak<http://stick.gk2.sk/blog/2009/06/svg-edit-a-web-based-svg-editor/>. .... That made my job reasonably easy. I chopped their editor to pieces and stripped out a lot of stuff, partially to reduce the amount of work to make it work with Wave, partially to remove features that aren't quite finished yet.
The result is still buggy (clearing the canvas doesn't work; deletion is shaky), not as efficient as it could be (at the moment it re-sends all attributes of modified elements instead of just the changed ones, but that's easily fixed), lacks lots of features (like moving objects, saving, loading external SVG's etc.). "Google Wave gadget" is an advertised feature of svg-edit, so I tried, in google-wave<https://wave.google.com/wave/?pli=1#restored:wave:googlewave.com!w%252Bedlc50w0G.1> , - http://www.hokstad.com/static/wave/svg-edit.xml in the "..."->"Add Gadget by URL"and indeed, this widget does appear in Wave... it doesn't work very well (I only tried for 1 minute), but a lot of the controls work. For Xwiki integration, what would be interesting would be to get the the extension to automatically save the resulting SVG as an attachment in the document containing the #svgEdit() (the Xwiki macro that would wrap svg-edit for xwiki use). Alternately, were we to have generic google wave support in Xwiki, then svg-edit could be supported through wave.... Niels http://nielsmayer.com <http://nielsmayer.com>PS: while we're pointing out cool things using canvas&javascript: http://raphaeljs.com/