mieweb / wikiGDrive

Wiki for Google Shared Drive
15 stars 6 forks source link

Embedded SVG will not display properly #353

Closed horner closed 1 year ago

horner commented 1 year ago

An embedded SVG:

image

This will not work because Google uses OpenOffice SVG standard that the browser cannot understand. See: https://github.com/mieweb/wikiGDrive/blob/4b27b68ceb73077c2c97cc4401b26318e8e459d1/test/md/diagrams/embedded-diagram-example.xml#L181

The 4rd parameter is a G which is documented here: https://documentation.libreoffice.org/assets/Uploads/Documentation/en/Tutorials/CustomShapes7/Custom-Shape-Tutorial.odt but not supported by any browser, only Libreoffice.

Wiki Drive will put out:

image

INSTEAD OF EMBEDDED DIAGRAM ABOVE USE EMBEDDED DIAGRAM FROM DRIVE AND PUT LINK TO IT IN THE DESCRIPTION.

https://github.com/mieweb/wikiGDrive/blob/0f9600d622126c7a1607113b022e7b960f89aa35/src/odt/OdtToMarkdown.ts#L303

Work around

Move the SVG image to its own Google Drawing:

Screenshot 2022-12-28 at 10 26 33 AM

Then insert the Google Drawing into the document.

Screenshot 2022-12-28 at 10 28 20 AM
horner commented 1 year ago

Documentation: https://documentation.libreoffice.org/assets/Uploads/Documentation/en/Tutorials/CustomShapes7/Custom-Shape-Tutorial.odt

horner commented 1 year ago

This issue won't be worked on until someone comes up with a good idea on how to fix.