Export Raphaël paper objects to SVG.
JavaScript CSS HTML
Latest commit 4088f31 Aug 4, 2015 @AliasIO Merge pull request #50 from nit23uec/master
Fixing Undefined error in font-family attr in extractStyle function



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;