Unable to copy a page and keep custom color scheme in tables
Asked by drsette:

We created a page that had a table with custom colors in the cells. When we try to copy the page or copy the table to a new page, it removes the color scheme. Why does it not copy the source code?


Answers:
author: AnnWorley
body: I opened a bug report for this issue: [Copy and paste in Confluence editor drops custom colors from table](https://jira.atlassian.com/browse/CONFSERVER-55282). I already let Dawne know in her support request, but for the rest of the forum, please vote or comment on the bug if this functionality is important for your team.


author: AnnWorley
body: Hi Dawne,

Please let me know more about how the tables were created, and how the custom colors were added. Please let us know what version of Confluence you are using, too.

I tested in Confluence Cloud and Confluence 6.8 and in both cases the colors were retained when I copied the page. Here are the steps I followed:

1. Clicked on Edit to edit a page
2. Used the insert table pulldown to insert a table
3. Used the button in the toolbar to add a color to a cell
4. Copied the page to another space
5. Verified the color was still in the cell

To directly copy page storage format you may want to check out a Source Editor like [Source Editor for Confluence](https://marketplace.atlassian.com/plugins/com.mohamicorp.html.source.editor.for.confluence/cloud/overview) for Confluence Cloud or [Source Editor for Confluence](https://marketplace.atlassian.com/plugins/com.atlassian.confluence.plugins.editor.confluence-source-editor/server/overview) for Confluence Server.

Thanks,

Ann

comments: author: drsette
body: Hi Ann,

We are not using the colors in the confluence tool bar. Basically, someone created a table, and in the source editor they changed the cell colors to an HTML color. When you try to copy the page, it dosn't copy in the html colors. If you try to just copy the table using the toolbar it copes the table, without the colors.


author: AnnWorley
body: Hi Dawne,

Since you already have the Source Editor installed, a workaround would be to copy and paste the content from the source page to the destination. To access the source editor, edit the page, use the \<\> icon on the top right of the source page to access the XHTML then copy and paste the storage format from the original page using the same icon on the destination page.

![Screen Shot 2018-03-27 at 1.27.01 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/18043iD6EACD6E886FDE7F/image-dimensions/469x93?v=v2 "Screen Shot 2018-03-27 at 1.27.01 PM.png")

Please let me know whether you are using Confluence Cloud or Server and which version of Server if you are not on Cloud. Cloud URLs include "atlassian.net" so if you have that domain in your URL you are using Cloud. For Server, the version is at the bottom of every page for most themes.


author: drsette
body: We are using the server version. We can copy and paste from the source code editor, but it is a pain when there is a lot on the page and we only want the table. I was wanting to know why we can't copy the table and it keep the source code.


author: AnnWorley
body: Please let me know the server version, it should be at the bottom of the login page if your instance is not customized:

![Screen Shot 2018-03-27 at 5.50.59 PM.png](https://community.atlassian.com/t5/image/serverpage/image-id/18065iECFDB6426C104B3D/image-dimensions/263x28?v=v2 "Screen Shot 2018-03-27 at 5.50.59 PM.png")

I would need to test in your version and the latest to open a bug report. I will also need your storage format:

1. Click on the ellipsis (...) in the top right-hand corner and select **View Storage Format** from the dropdown.??
2. Copy the storage format and paste it into this thread.

<br />

<br />


author: drsette
body: Server version is 6.1.4.

Storage format:

```
<ac:layout><ac:layout-section ac:type="three_equal"><ac:layout-cell><p>E-mail:&nbsp;<a href="mailto:drsette@sandia.gov">drsette@sandia.gov</a><br />Phone: 505-844-1993<br />Cell: 505-270-6999</p><p>Helpful Links:</p><p><a href="https://snl-wiki.sandia.gov/display/TWDSNLCA/Author+Instructions">CA TWD Pages</a></p><p><a href="https://time.sandia.gov">https://time.sandia.gov</a></p><p><ac:link><ri:space ri:space-key="1C" /><ac:plain-text-link-body><![CDATA[1530 Knowledge Base]]></ac:plain-text-link-body></ac:link></p><p><ac:link><ri:space ri:space-key="1KB" /></ac:link></p><p><ac:link><ri:page ri:content-title="Org. 1534 Energetic Environments Home" ri:space-key="O1EE" /><ac:plain-text-link-body><![CDATA[1534 Knowledge Base]]></ac:plain-text-link-body></ac:link></p><p><ac:link><ri:page ri:content-title="1535 Knowledge Base" ri:space-key="1535KB" /></ac:link></p><p><a href="https://snl-wiki.sandia.gov/pages/viewpage.action?pageId=213820558">Confluence Class - Anthony</a></p><p><ac:link><ri:page ri:content-title="Success at Sandia Home" ri:space-key="S2" /></ac:link></p><p><a href="https://confluence.atlassian.com/display/CONF43/Keyboard+Shortcuts">Keyboard Shortcuts</a></p><br /><p>&nbsp;</p><p>&nbsp;</p></ac:layout-cell><ac:layout-cell><p>&nbsp;</p></ac:layout-cell><ac:layout-cell><p>&nbsp;</p></ac:layout-cell></ac:layout-section></ac:layout>
```


author: AnnWorley
body: Hi Dawne,

Thanks so much for letting me know the version and pasting in the storage format.

The storage format provided does not contain a table. I restored it on a Confluence 6.1.4 instance and it was just a contact list and links that are not within a table.

I added a table to a page on the instance to get sample storage format, which looks like:

```
<table class="wrapped"><colgroup><col /><col /></colgroup><tbody><tr><th><br /></th><th><br /></th></tr><tr><td class="highlight-green" data-highlight-colour="green"><br /></td><td class="highlight-green" data-highlight-colour="green"><br /></td></tr><tr><td class="highlight-blue" data-highlight-colour="blue"><br /></td><td class="highlight-blue" data-highlight-colour="blue"><br /></td></tr></tbody></table>
```

You mentioned that your team can restore the tables from the storage format using the source editor. Please add the portion of the page's storage format that I can use to restore the table that cannot be copied.

My aim is to reproduce the issue with not being able to copy the custom colors to a new page, then open a feature request asking the development team to add the functionality of copying custom colors.

Thanks,

Ann


author: drsette
body: Hi Ann,

Sorry, I misunderstood what you were asking for. When I try pasting the storage format to send to you I get an error that says, your message was not accepted. Check for invalid HTML or try reposting as plain text.

Still working on a way to get this to you....

Dawne


author: drsette
body: Here is a small piece of it.

```
<tr><th style="text-align: center;" colspan="7">Opportunities</th><th style="text-align: center;" colspan="7">Risks</th></tr><tr><td colspan="2" rowspan="2"><br /></td><td style="text-align: center;" colspan="5">Impact</td><td style="text-align: center;" colspan="5">Impact</td><td colspan="2" rowspan="2"><br /></td></tr><tr><td style="text-align: center;">High (5)</td><td style="text-align: center;">Major (4)</td><td style="text-align: center;">Moderate (3)</td><td style="text-align: center;">Minor (2)</td><td style="text-align: center;">Insignificant (1)</td><td style="text-align: center;">Insignificant (1)</td><td style="text-align: center;">Minor (2)</td><td style="text-align: center;">Moderate (3)</td><td style="text-align: center;">Major (4)</td><td style="text-align: center;">High (5)</td></tr><tr><td rowspan="5">Probability</td><td>Almost Certain (5)</td><td style="background-color: rgb(191,128,255);"><br /></td><td style="background-color: rgb(191,128,255);"><br /></td><td style="background-color: rgb(191,128,255);"><br /></td><td style="background-color: rgb(128,159,255);"><br /></td><td style="background-color: rgb(128,223,255);"><br /></td><td style="background-color: rgb(128,255,159);"><br /></td><td style="background-color: rgb(255,255,128);"><br /></td><td style="background-color: rgb(255,191,128);"><br /></td><td style="background-color: rgb(255,191,128);"><br /></td><td style="background-color: rgb(255,191,128);"><br /></td><td>Certain (5)</td><td rowspan="5">Probability</td></tr><tr><td colspan="1">Likely (4)</td><td style="background-color: rgb(191,128,255);" colspan="1"><br /></td><td style="background-color: rgb(191,128,255);" colspan="1"><br /></td><td style="background-color: rgb(128,159,255);" colspan="1"><br /></td><td style="background-color: rgb(128,159,255);" colspan="1"><br /></td><td style="background-color: rgb(128,223,255);"><br /></td><td style="background-color: rgb(128,255,159);"><br /></td><td style="background-color: rgb(255,255,128);"><br /></td><td style="background-color: rgb(255,255,128);"><br /></td><td style="background-color: rgb(255,191,128);" colspan="1"><br /></td><td style="background-color: rgb(255,191,128);" colspan="1"><br /></td><td colspan="1">Likely (4)</td></tr><tr><td colspan="1">Possible (3)</td><td style="background-color: rgb(191,128,255);" colspan="1"><br /></td><td style="background-color: rgb(128,159,255);" colspan="1"><br /></td><td style="background-color: rgb(128,159,255);" colspan="1"><br /></td><td style="background-color: rgb(128,223,255);"><br /></td><td style="background-color: rgb(128,223,255);"><br /></td><td style="background-color: rgb(128,255,159);"><br /></td><td style="background-color: rgb(128,255,159);"><br /></td><td style="background-color: rgb(255,255,128);"><br /></td><td style="background-color: rgb(255,255,128);"><br /></td><td style="background-color: rgb(255,191,128);" colspan="1"><br /></td><td colspan="1">Possible (3)</td></tr><tr>
```


author: AnnWorley
body: I regret to report that the storage format didn't render as a table on my test instance. In order to share files and take a closer look, I opened a ticket on your behalf on our support portal. You will receive a confirmation email from atlassian.com with your ticket details within the next few minutes. (Please check your spam or junk folder if you don't see this in your inbox.) Thanks!