jgraph / drawio

draw.io is a JavaScript, client-side editor for general diagramming.
https://www.drawio.com
Other
41.31k stars 7.66k forks source link

Reduce/Eliminate Dependance on foreign objects (foreignObject) in the SVG data #3108

Open FirbyKirby opened 2 years ago

FirbyKirby commented 2 years ago

Is your feature request related to a problem? Please describe. Our team is frustrated when they export their drawings which include formatted text as SVG for import into Adobe Framemaker where we compose and publish technical documents in PDF form (data sheets, application notes, etc.) We often use subscript and superscript formatting in the text of our drawings because we are producing technical drawings with electrical symbols and quantities (see attached for an example.) We run into the behavior defined in this FAQ. Why text in exported SVG images may not display correctly

Describe the solution you'd like We would like the SVG export function to format text using standard SVG XML tags so they will render properly in tools that support SVG other than browsers (Framemaker, DITA, etc.)

Describe alternatives you've considered We've used the "Convert Labels to SVG" export option, which converts all the text into paths, but this is problematic because we edit the SVG XML in a text editor, and it also makes import of the SVG into other diagram editors more difficult (text doesn't import well as a path.) We have implemented the "simpleLables" tag across our instance to prevent users from using formatted text at all, but this gives the tool a poor reputation because it's text capability seems lacking (the thing we need the most, subscript, it can't do.) We require subscript and superscript for our documents, so we recommend a "workaround" to users for this issue by using two text boxes, offset, and grouped (like below.) image image

Additional context Our use case doesn't require any URLs or links in the text. We don't need any of the "insert" options on the text panel. It would be great if foreign objects were eliminated, but even if we could just do subscript and superscript without them, our use case would be solved.

For reference, I'm making this request on behalf of my company who licenses draw.io for Confluence Datacenter and Confluence Cloud. Here is an example SVG that we would export then import into Framemaker and which would exhibit the behavior.

si828x_dc-dc_restart_diagram drawio v2

And here is an example of the technical documents we are publishing via Framemaker using draw.io diagrams as an additional example of our use case. Si834x Data Sheet

An alternative "solution" to this problem (if you can call it that) would be to offer an export option directly into framemaker (*.ai).

mararad commented 2 years ago

Asked in DID-6507

davidjgraph commented 8 months ago

I'd say try the latest draw.io for conf DC, this one should be improved.

Enivex commented 6 months ago

I'll add that this is something that comes up at least once a week on the Discord for typst. It would be nice to be able to not have to tell people to avoid draw.io

https://github.com/typst/typst/issues/1421