Have SugarCube leave my SVG alone

0 votes
asked Jul 16 by Herbert (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
answered Jul 16 by TheMadExile (9,160 points)
selected Jul 20 by Herbert
 
Best answer

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

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

 

commented Jul 17 by cedeo (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.
commented Jul 20 by Herbert (150 points)
For SugarCube this is it. Thank you.
...