Generate beautiful draw.io diagrams with a mandatory visual QA loop. Covers flowcharts, ERD, architecture, sequence, and class diagrams. Use when user reques...
浏览器
drawio-to-html
试用Convert drawio/diagrams.net flowchart and diagram files into self-contained HTML pages with embedded SVG rendering. Use when the user uploads or mentions a .drawio file and wants to convert it to HTML, view it in a browser, or share it as a web page. Triggers on phrases like "drawio转html", "流程图转网页",
它能做什么
Convert drawio/diagrams.net flowchart and diagram files into self-contained HTML pages with embedded SVG rendering. Use when the user uploads or mentions a .drawio file and wants to convert it to HTML, view it in a browser, or share it as a web page. Triggers on phrases like "drawio转html", "流程图转网页", "把drawio转成html", "drawio to html".
技能文档
Drawio to HTML
Convert drawio/diagrams.net XML files into standalone HTML pages with embedded SVG.
Supported Input
.drawiofiles (diagrams.net / draw.io native format)- Files containing
mxGraphModelXML structure
Supported Output
- Self-contained
.htmlfiles with embedded SVG - No external dependencies — open directly in any browser
- Preserves original colors, shapes, rounded corners, diamonds, arrows, edge labels
Workflow
Step 1: Locate the drawio file
Get the file path from the user or workspace context.
Step 2: Run the conversion script
Execute the bundled Python script:
python3 scripts/drawio2html.py [output.html]
If output.html is omitted, the script defaults to .html in the same directory.
Step 3: Report results
Tell the user:
- Output file path
- File size
- Diagram name extracted from the XML
- Any nodes/edges that could not be rendered (if applicable)
Node Shape Support
| drawio Style | SVG Output |
|---|---|
rounded=1 / arcSize | Rounded rectangle (pill or soft rounded) |
rhombus | Diamond (decision nodes) |
| default | Rectangle with slight corner radius |
Edge Support
- Orthogonal connectors with waypoints
- Solid and dashed lines
- Arrow markers
- Edge labels ("是"/"否" branch annotations)
Limitations
- Does not render: swimlanes, images, complex gradient fills, custom shapes
- Text inside nodes is centered; multi-line text supported
- Only the first `` element is rendered if multiple exist
Script Reference
The conversion logic lives in scripts/drawio2html.py. It is a pure-Python script with no external dependencies beyond the standard library (xml.etree, re, sys, os).
相关技能
Create and edit draw.io diagrams through the configured drawio MCP server, including flowcharts, architecture diagrams, ML model diagrams, Chinese labels, an...
Generate beautiful draw.io diagrams with a mandatory visual QA loop. Covers flowcharts, ERD, architecture, sequence, and class diagrams. Use when user reques...
Use when creating editable technical diagrams with draw.io / diagrams.net sources, including architecture diagrams, ERD, UML, sequence diagrams, flowcharts, ML model diagrams, official shape lookup, brand symbols, Graphviz auto-layout, codebase structure maps, .drawio validation, or draw.io CLI expo
用本地 draw.io 桌面 CLI 生成 .drawio 图,并导出 PNG/SVG/PDF/JPG。
Create or revise standalone HTML/SVG architecture diagrams, runtime flow diagrams, sequence diagrams, and PPT-like technical visuals. Use when a user wants h...