Skip to content
This repository

Export Raphaël paper objects to SVG.

branch: master

Fixed merge

latest commit 42cf9bb420
Dominik Hardtke dhardtke authored April 16, 2014 ElbertF committed April 17, 2014
Octocat-spinner-32 tests added support for text-anchor, modified test February 13, 2014
Octocat-spinner-32 .gitignore Ignored OS X's .DS_Store crap December 06, 2011
Octocat-spinner-32 Updated README December 04, 2011
Octocat-spinner-32 raphael.export.js Fixed merge April 17, 2014


Export Raphaël paper objects to SVG. Also works in browsers that don\'t support SVG (e.g. IE6, IE7, IE8).


<script type="text/javascript" src="raphael-min.js"></script>
<script type="text/javascript" src="raphael.export.js"></script>

<div id="foo"></div>
<div id="bar"></div>

<script type="text/javascript">
    var paper = Raphael('foo');

    var rect = paper
        .rect(50, 40, 50, 50)
        .attr('fill', '#f00')

    var svg = paper.toSVG();

    document.getElementById('bar').innerHTML = svg;
Something went wrong with that request. Please try again.