Short answer. draw.io writes most labels as HTML inside foreignObject elements of the SVG, with a short plain-text copy next to each one as a fallback. Wherever that HTML is not rendered, you see the fallback: one line, cut off, no formatting, no links, plus the warning "Text is not SVG - cannot display". Fix it in the export with Convert Labels to SVG, or by turning off formatted text. Labels with links cannot be converted, so for those you need a viewer that renders the HTML.
What is inside the file
Open an exported .svg in a text editor and look at one shape. You will find a <switch> with two children: a <foreignObject> holding a few nested <div> elements with your label, its line breaks, bold text and links, and after it a plain <text> element with a shortened copy. A viewer that renders foreignObject shows the first; anything else falls through to the second.
draw.io documents this in Why text in exported SVG images may not display correctly: it uses foreignObject "to allow complex HTML labels on shapes", and viewers that cannot render them show a shortened label and the "Text is not SVG - cannot display" message.
Who renders it and who does not
| Where the SVG ends up | What you see |
|---|---|
| Modern browser opening the file | Full labels, working links |
| Inkscape, some editors and converters | Fallback text, warning |
| Some tools that sanitize SVG for safety | Strip foreignObject entirely, because HTML inside an SVG can carry scripts, so you get the fallback |
| Confluence Cloud, SVG attached and shown on the page | Shown as a flat image: labels may look fine, but no link works |
The Confluence case is the most confusing, because the labels look right and only the clicks fail. That one is about how Confluence displays images, which we covered in why Confluence turns your SVG into a flat image.
Fixes in draw.io, from simplest
1. Convert Labels to SVG
Select the shapes, open the Text tab, and under Advanced tick Convert Labels to SVG. The labels become native SVG text that every viewer shows. The catch, from draw.io's own documentation: "Labels containing tables, lists, links, or elements with background colours are not supported", and the checkbox is disabled for them.
2. Turn off Formatted Text and Word Wrap
Select all, then untick Formatted Text and Word Wrap in the Text tab. Plain labels are written as SVG text. You lose bold and colours inside labels and may need to add line breaks by hand.
3. Embed Fonts
Useful when the text shows up in the wrong typeface. It does nothing for labels that are not rendered at all: there the problem is the foreignObject, not the font.
4. Through PDF
draw.io also suggests exporting to PDF and converting that to SVG in a tool like Inkscape, which turns every label into real text or outlines. It works, and it is a lot of steps for a diagram that changes every month.
What does not help
The svg-warning=0 URL parameter hides the warning. The labels stay broken.
The trade-off people hit: a label with a link cannot be converted, and converting the rest gives a diagram where some labels are SVG text and the linked ones still depend on foreignObject. If links are the point of the diagram, conversion is not the answer.
The arithmetic
An architecture diagram with 40 shapes, a dozen of them linking to runbooks. Converting the plain labels takes a minute. Rewriting the twelve linked labels so they carry the link on the shape instead of inside the text takes about half an hour, and the next person who edits the diagram will put links back into labels, because that is the natural way to do it in draw.io. Choosing a viewer that renders the HTML safely is usually cheaper than fighting the format.
If your diagrams have no links in labels, Convert Labels to SVG is free and solves it. Use that.
Showing these diagrams in Confluence with links working
Two routes keep the links. The draw.io app for Confluence renders from the source file, so nothing is lost, at the price of the app. Or an app that renders the exported SVG as live SVG on the page.
Disclosure: I build Clickable SVG for Confluence, which does the second. Honest detail: until 22 October 2026 our own sanitizer removed foreignObject completely, for the safety reason above, so draw.io labels showed as the cut-off fallback and links inside labels were lost. It now keeps the HTML of the labels through an allowlist (text, formatting and links only; scripts, forms and frames are removed), so labels and their links come through. It runs inside Atlassian's infrastructure and is free for teams up to ten people.
Frequently asked
What does "Text is not SVG - cannot display" mean?
The viewer did not render the HTML part of the labels and fell back to the plain-text copies. The diagram itself is fine.
Why is the Convert Labels to SVG checkbox greyed out?
The selected label contains a link, a list, a table or a background colour. draw.io cannot express those as plain SVG text.
Why do links work when I open the SVG in a browser but not in Confluence?
The browser renders the file as a live document. Confluence shows an attached SVG as an image, and an image cannot have clickable parts.
Can I stop draw.io from creating foreignObject at all?
In self-hosted or embedded draw.io, the editor configuration option simpleLabels makes it write plain labels. On the hosted editor, untick Formatted Text instead.
Related: how to make a diagram clickable in Confluence Cloud, why Confluence turns your SVG into a flat image, and diagram tools in Confluence compared.
Top comments (0)