0 votes
by (150 points)
I am using SugarCube v2.19.0. I want to add interactive imagery using SVG graphics. Inline SVG is perfectly supported in HTML 5. Unfortunately, SugarCube seems to mangle all content with a JavaScript class named Wikifier. The Wikifier re-creates all SVG elements as HTML elements. As a result, the image data is no longer valid and no image is displayed.

How can I stop SugarCube from messing with my graphics? It seems, I need some kind of "raw input" specifier. Does something like this exist?

1 Answer

0 votes
by (68.6k points)
selected by
 
Best answer

Use the raw HTML markup, <html></html>.  For example:

<html>
<!-- Your SVG markup here. -->
</html>

 

by (110 points)
Does anyone know if this should also work with Harlowe? And if not, is there any way to use SVG directly? (I am able to base64 encode it and use it as a data-uri in an img tag, but would be nice to write out svg directly.
by (150 points)
For SugarCube this is it. Thank you.
...