mirror of
https://github.com/DayuanJiang/next-ai-draw-io.git
synced 2026-01-02 22:32:27 +08:00
When clicking an example diagram on a clean page (no existing diagram), the code was passing raw <root>...</root> format XML directly to DrawIO. However, DrawIO expects the full mxfile/diagram/mxGraphModel/root structure. This fix provides a default mxfile template when chartXML is empty, ensuring replaceNodes properly wraps the content before loading into DrawIO. Co-authored-by: dayuan.jiang <jiangdy@amazon.co.jp>