Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

SugarCube 2 How to use svg?

Hello.
I tried to use something like this in passage:
<svg>
<line x1="0" y1="0" x2="200" y2="200" stroke-width="1" stroke="rgb(0,0,0)"/>
</svg>
but it doesn't work. I don't see this line.
Something like this works in Harlowe, but does't work in SugarCube again.
<svg xmlns="http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink"><rect x="10" y="10" height="100" width="100" style="stroke:#ff0000; fill: #0000ff"/></svg>
Can you to explain what I am doing wrong?

SugarCube 2.12.0 Twine 2.0.11

Comments

  • edited December 2016
    Please use the code tag when posting code and or markup--it's C on the editor bar.

    The raw HTML formatter is probably breaking the SVG's XML. As a workaround, try wrapping your SVG tags within the verbatim HTML formatter markup, which looks like a pair of <html> tags. For example:
    <html>...your SVG tags here...</html>
    
  • Oh, very very thanks, man!
    Now I am happy with Sugar Cube and Twine: simple using css, normal saves, cycles and graphics embeded into one file.
Sign In or Register to comment.