Have SugarCube leave my SVG alone

0 votes
asked 5 days ago 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 5 days ago by TheMadExile (4,330 points)
selected 1 day ago by Herbert
 
Best answer

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

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

 

commented 4 days ago by cedeo (100 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 1 day ago by Herbert (150 points)
For SugarCube this is it. Thank you.
...