tags:

views:

39

answers:

1

Hi,

I'm using this: http://code.google.com/p/svg-edit/

I put a hard coded code inside the svgcanvas div html tag:

<div id="svgcanvas">
    <svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" id="svgroot" height="480" width="640"><svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 640 480" id="svgcontent"><g style="pointer-events: all;"><title style="pointer-events: inherit;">Layer 1</title><ellipse ry="69" rx="90" style="pointer-events: inherit;" stroke-width="5" stroke="#000000" fill="#FF0000" id="svg_1" cy="156.5" cx="286"></ellipse></g></svg><g id="selectorParentGroup"><rect style="pointer-events: none;" display="none" stroke-width="0.5" stroke="#22C" fill-opacity="0.15" fill="#22C" id="selectorRubberBand"></rect></g></svg>
</div>

My expected output is that it should draw the example svg code in there but it didn't. Even if I reload the page it will still not appear.

How can I make it appear?

Thanks

A: 

Finally and thank god hehe someone answered my question in the google code page of svg-edit. Here is the answer link: Answer

Thanks to adeveria.

<script language="javascript">
$(function() {
    setTimeout(function () {
        stroke="#000000" stroke-width="5" style="pointer-events: inherit;" rx="30" ry="27"/></svg>');
        svgCanvas.setSvgString('<svg xmlns:xlink="http://www.w3.org/1999/xlink" 
xmlns="http://www.w3.org/2000/svg" id="svgroot" height="480" width="640"><svg 
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" viewbox="0 0 640 480" 
id="svgcontent"><g style="pointer-events: all;"><title style="pointer-events: inherit;">Layer 
1</title><ellipse ry="69" rx="90" style="pointer-events: inherit;" stroke-width="5" stroke="#000000" 
fill="#FF0000" id="svg_1" cy="156.5" cx="286"></ellipse></g></svg><g id="selectorParentGroup"><rect 
style="pointer-events: none;" display="none" stroke-width="0.5" stroke="#22C" fill-opacity="0.15" 
fill="#22C" id="selectorRubberBand"></rect></g></svg>');
    }, 500);
});
</script>
marknt15
http://code.google.com/p/svg-edit/issues/detail?id=562source of answer
marknt15