Mermaid, draw.io and Excalidraw files as pictures
.drawioand.excalidrawopen as one inline SVG drawn on the server:
rectangles, ellipses, diamonds, text and arrows at their own coordinates.
.mmdand.mermaidcannot be drawn without Mermaid, which the forge does
not ship: the page names the diagram type the first line gives and folds the source below it.
- A compressed draw.io page, malformed input, a file over 1 MB, or a Mermaid
file with no diagram type shows the source view with the reason.
- Text is escaped; no script runs on the origin; no dependency.
src/web/render/diagram.tsdraws;kinds.tsmaps the extensions.
What is not drawn
- Colours, fills, strokes and fonts: shapes are outlines in the page's text colour.
- Nesting and grouping: a draw.io child is placed at its own coordinates, not
offset by its parent container or group.
- Compressed draw.io pages (the default "compressed XML" export): the page says so and
shows the source; export uncompressed to see the drawing.
- Past 5,000 elements or coordinates beyond 1,000,000, the file shows as source.
A wide drawing scales down to the frame, as the other picture views do.