Hey @Quentin_Morel —
In case you missed, you can also utilize some HTML+CSS in your SVG and take advantage of a higher level layout engine than tweaking coordinates yourself:
Remember SVG in Coda ?
Well, @Artem_F (who is my partner for CodaTricks and consulting/building docs for hire, by the way) was studying SVG and discovered a property <foreignObject> that allowed rendering some HTML within SVG.
The capabilities are of course limited. While displayed in an image (like an SVG would), no scripts can run, no mouse events captured (so no hover effects, no interactivity whatsoever), no external resources (fonts, images etc) loaded. You also have to use XML syntax, e.g…
There’s also a pack that allows you to make and embed actual HTML+CSS+JS in Coda:
update: it’s broken now but the approach is still pretty valid if you can host the HTML file yourself.
IMPORTANT UPDATE: Itsy’s technical approach caused the Codans to recognize a potential security risk and has since remove the ability of the temporary blob storage from hosting content embedded in documents. As such, Itsy() no longer works as expected. However, I will leave this as an interesting legacy Pack with source for no other reason that to demonstrate how to save content into the temporary blob storage.
Read on if you want to see some cool stuff that will never work. Itsy() has bitsy th…
1 Like