How can I copy a complete draw.io diagram and then edit the copy only?
Asked by Mikkel Christensen:

I have a draw.io diagram on a Confluence page. I want to copy that diagram to another page and then edit it there.

The "Duplicate" button works, but only when copying the diagram to the same page.

If I select an existing diagram after pressing "Insert - Draw.io Diagram", I cannot edit it. There are 2 variations of this:

* If I select "Link to diagram", it is just plain not editable.
* If I click "Select" instead, the "Save" button in draw.io seems at first to let me save the diagram with a new name, but it also clears all content from the diagram.

So what I am stuck with is the complete inability to create an editable copy of a diagram. And actually I can't move a diagram from one Confluence page to another.  
[](https://community.atlassian.com/t5/Confluence-questions/How-can-I-copy-a-complete-draw-io-diagram-and-then-edit-the-copy/qaq-p/275336?attachment-id=10994){#link_118862a491b26e}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/46568/1/image2016-3-17%2022%3A16%3A59.png){#display_118862a491b26e_0}  
[](https://community.atlassian.com/t5/Confluence-questions/How-can-I-copy-a-complete-draw-io-diagram-and-then-edit-the-copy/qaq-p/275336?attachment-id=10995){#link_118862a491b26e_0}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/46568/2/image2016-3-17%2022%3A14%3A50.png){#display_118862a491b26e_2}  
[](https://community.atlassian.com/t5/Confluence-questions/How-can-I-copy-a-complete-draw-io-diagram-and-then-edit-the-copy/qaq-p/275336?attachment-id=10996){#link_118862a491b26e_1}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/46568/3/image2016-3-17%2022%3A20%3A14.png){#display_118862a491b26e_4}  
[](https://community.atlassian.com/t5/Confluence-questions/How-can-I-copy-a-complete-draw-io-diagram-and-then-edit-the-copy/qaq-p/275336?attachment-id=10997){#link_118862a491b26e_2}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/46568/4/image2016-3-17%2022%3A7%3A1.png){#display_118862a491b26e_6}  
[](https://community.atlassian.com/t5/Confluence-questions/How-can-I-copy-a-complete-draw-io-diagram-and-then-edit-the-copy/qaq-p/275336?attachment-id=10998){#link_118862a491b26e_3}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/46568/5/image2016-3-17%2022%3A18%3A18.png){#display_118862a491b26e_8}


Answers:
author: David Benson _draw_io_
body: Go to the page you want to insert the new diagram and insert a draw.io diagram from the insert menu. In the dialog that appears select "search" on the left:

Screen Shot 2015-06-02 at 19.14.28.png

search for the original diagram by name and then select it from the results. This will insert a clone of that original in that page.

The reason we do it this way only is to enforce a page revision to be created of that page, so it happens within the edit flow of that specific page.

It would also appear in the recent diagrams list if you changed it recently.  
[](https://community.atlassian.com/t5/Confluence-questions/How-can-I-copy-a-complete-draw-io-diagram-and-then-edit-the-copy/qaq-p/275336?attachment-id=3151){#link_118862b08a9905}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/46569/1/Screen%20Shot%202015-06-02%20at%2019.14.28.png){#display_118862b08a9905_0}

comments: author: Taci7
body: I understand the purist aspects in versioning of not offering a "Save as" function. But its not a reasonable reason for not including a basic function virtually universal in all other similar applications, it's not productive.


author: Arthur Nardy
body: Fully agreed - it is as unproductive as pain in the neck to find basic functionality in circumventions !


author: David Benson _draw_io_
body: What is your proposed flow of steps for implementing this?


author: Arthur Nardy
body: I'm not in your source code, I was just exposing a basic need - duplication must be more straightforward as it is now. The draw.io proposes "make a copy" or "save as" directly from "file" menu. This is far more straightforward and convenient for the final user.


author: David Benson _draw_io_
body: But you need to insert a new macro onto the Confluence page, there needs to be a workflow (and a macro editor invoked). I don't understand how this straightforward process would work.


author: Taci7
body: I understand the purist aspects in versioning of not offering a "Save as" function. But its not a reasonable reason for not including a basic function virtually universal in all other similar applications, it's not productive.


author: Mikkel Christensen
body: Hi David,

Thank you for your answer. I have tried the method you describe several times, and just to make sure I tried it again now and recorded the exact steps I followed. Here is my result.

Steps taken:

1. Click "Edit" on a confluence page
2. In page editor, select "Insert"-\>"Draw.io diagram"
3. In Draw.io popup, choose a diagram from "Recent diagrams" and click "Select".
4. Diagram editor opens.
5. Try to change something in the diagram - not possible, the diagram is not editable. I cannot insert shapes or move or edit shapes.
6. Click "Save". A filename popup appears with default file name. Enter the new name "newtestDrawing1.xml" and click "Save"
7. **Diagram turns completely blank. All content is gone.** In the top bar to the right of the "Help" menu, a text says "Error loading file"

So this procedure does not work for me. I hope you have a solution for this.

comments: author: David Benson _draw_io_
body: Yes, there seems to be a bug there, we've assigned an engineer to look at it. As a workaround for now, you can copy and paste a diagram within from the original to a new blank diagram to make a copy.


author: Mikkel Christensen
body: Thank you for fixing this. I am looking forward to an updated version without the bug.I don't think your workaround works. This is what I have done:1. Open a blank diagram in a Draw.io editor in one browser tab2. Open an existing diagram in a Draw.io editor in another browser tab.3. In the existing diagram: "Edit-\>Select All" and "Edit-\>Copy"4. In the new diagram: "Edit-\>Paste" \<-- This menu item is greyed out and not working.I am using Firefox on Linux if that matters.


author: David Benson _draw_io_
body: Use ctrl-C and ctrl-V instead of the edit menu for copy and paste. It's not technically possible to access the system clipboard from a browser using the menus.


author: Mikkel Christensen
body: Ctrl+C and Ctrl+V works.Do you have a time estimate on when the bugfix will be rolled out? I am in the process of deploying Confluence to more users and I have to make a decision between Gliffy and Draw.io. I favour Draw.io because of more advanced features, but I will be unable to defend that decision if basic functionality like copying a diagram just doesn't work.


author: David Benson _draw_io_
body: It's marked as critical, <https://desk.draw.io/browse/DFC-104>, so it'll be in the next release. The release will probably out when it's fixed. It's hard to give an exact date, but it'll be during June.


author: Mikkel Christensen
body: Thanks for the update.


author: David Benson _draw_io_
body: 5.1.1 contains a fix for the issue. Please update to that. Thanks for the report.


author: Mikkel Christensen
body: I have updated and I can confirm that I can now create a new diagram from a copy of an existing diagram. Thank you for the fix. It came just in time for some demonstrations of the tool that I have coming up.


author: Mathiyalagan
body: Hi David, After updating our draw.io plugin into evaluation license, All of my diagrams stills show with the "draw.io evaluation copy" and I'm unable to edit them.But I can create new one and able to update the same..


author: Boris
body: @Mahendran Hi. Could you create a support request at <https://desk.draw.io/servicedesk/customer/portal/7/create/24> detailing the problem. We'd need the Confluence version, current plugin version, plugin version you upgraded from(if any). Thanks.


author: Mathiyalagan
body: Thanks, Ticket has been opened, <https://desk.draw.io/servicedesk/customer/portal/7/DFCS-74>


Tags: addon-com.mxgraph.jira.plugins.drawio