varkor / quiver

A modern commutative diagram editor for the web.
https://q.uiver.app
MIT License
2.43k stars 83 forks source link

Can't get Quiver content to show up when I embed it on my site #161

Closed enjoysmath closed 1 year ago

enjoysmath commented 1 year ago

image

So as you can see quiver is doing something with the loading logo, but what it eventually loads is nothing. But if I change the embed code statically to a constant string, it seems to work.

<iframe class="quiver-embed" src="https://q.uiver.app/?q={{ diagram.embed_data }}&embed" width="100%" height="300"></iframe>

That's Django template notation.

embed_data holds:

image

I tested by passing in that string value as the q-parameter:

Link


I went to an online base64 calculator and get the following Json:

[0, 4, [0, 0, "\\bullet", [0, 0, 0, 1.0]], [1, 0, "\\bullet", [0, 0, 0, 1.0]], [0, 1, "\\bullet", [0, 0, 0, 1.0]], [1, 1, "\\bullet", [0, 0, 0, 1.0]], [0, 2, "", 0, {"label_position": 50, "offset": 0, "curve": 0, "shorten": {"source": 0, "target": 0}, "level": 1, "style": {"tail": {"name": "none", "side": "none"}, "head": {"name": "arrowhead", "side": "none"}, "body": {"name": "solid"}}, "colour": [0, 0, 0, 1.0]}, [0, 0, 0, 1.0]], [0, 1, "", 0, {"label_position": 50, "offset": 0, "curve": 0, "shorten": {"source": 0, "target": 0}, "level": 1, "style": {"tail": {"name": "none", "side": "none"}, "head": {"name": "arrowhead", "side": "none"}, "body": {"name": "solid"}}, "colour": [0, 0, 0, 1.0]}, [0, 0, 0, 1.0]], [1, 3, "", 0, {"label_position": 50, "offset": 0, "curve": 0, "shorten": {"source": 0, "target": 0}, "level": 1, "style": {"tail": {"name": "none", "side": "none"}, "head": {"name": "arrowhead", "side": "none"}, "body": {"name": "solid"}}, "colour": [0, 0, 0, 1.0]}, [0, 0, 0, 1.0]], [2, 3, "", 0, {"label_position": 50, "offset": 0, "curve": 0, "shorten": {"source": 0, "target": 0}, "level": 1, "style": {"tail": {"name": "none", "side": "none"}, "head": {"name": "arrowhead", "side": "none"}, "body": {"name": "solid"}}, "colour": [0, 0, 0, 1.0]}, [0, 0, 0, 1.0]]]

Can you seen anything immediately wrong with it? Should there be less "none"'s or something?