Rinagreen
Mar 21, 2023

--

I don't think there are any constraints. It's just that pasting a diagram's code can look very "heavy".

The easiest way is to create an iframe as per the tutorial here - https://drawio.freshdesk.com/support/solutions/articles/16000067789-generate-code-to-embed-a-diagram-in-a-webpage#:~:text=In%20the%20draw.io%20editor,on%20the%20right%20hand%20side.

You can then paste the iframe into your webpage.

But if you have a complicated diagram with multiple layers and animations, the iframe's code will be very lengthy.

Another option is to export your diagram as an HTML file (tutorial - https://drawio.freshdesk.com/support/solutions/articles/16000067785-export-a-diagram-to-various-file-formats) and try to load it on your webpage with jQuery (tutorial - https://www.tutorialspoint.com/How-to-load-external-HTML-into-a-div-using-jQuery).

However, in this case, you need to have both your webpage and your diargam in the same folder, so it has to be your self-made website.

I tried to load a diagram from my Google Drive - no success((

--

--

Responses (1)