CanvasAnvil is an open source AI diagram maker and flowchart generator - an infinite-canvas diagram editor and self-hosted drawio alternative that writes editable .drawio files. Text to diagram, then fix nodes, layout and labels in place. Also AI presentations, interior design CAD/BOM, posters and infographics.
TypeScript ai-agentsai-diagramai-presentationbomcadcanvasdiagramdiagram-generatordrawioflowchartinfographicspptppt-generatorpresentation-generatorreactsvgedittext-to-diagramtypescriptworkflow
Edit Rules
Use these rules when the task is a local edit to existing draw.io XML.
When local edits are appropriate
- text changes
- style changes on a small number of cells
- adding or removing a few nodes or edges
- small layout adjustments
When to avoid local edits
- full redraws
- major relayouts
- large structural changes
- cases where exact matching is unstable
Edit discipline
- Read the current XML carefully before editing.
- Replace the smallest valid
mxCellblock that solves the task. - Keep ids stable unless the user explicitly requests renaming.
- When deleting a node, account for connected edges.
- After editing, validate the result, then rebuild the online editor URL with
scripts/build-drawio-url.mjs.
Safe review checklist
- Did every edited edge keep valid
sourceandtargetids? - Did every new cell get a unique id?
- Did you preserve root cell structure?
- Did you avoid partial or malformed
mxCellfragments?