Can't copy paste colored text

Sergei Minyukevich October 6, 2020

Hi,

 

I have a script which generated HTML report (tables, paragraphs, texts) and when it is copy-pasted into Confluence, text color is lost (e.g. red, green, yellow).

Is there any workaround to fix it?

Sample of text:

<span style="color: red;">Current PHP version is deprecated so please schedule its upgrade with the manager.</span> 

1 answer

1 accepted

0 votes
Answer accepted
Bill Bailey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 6, 2020

And is the span tag stripped, or is it still there?

Generally, expecting the formatting to be retained with pasting into Confluence will cause disappointment.  I often just clear all formatting, then fix manually.

Sergei Minyukevich October 7, 2020

yes, it is there

fortunately, managed to fix - the issue was about limited number of text colors in Confluence

instead of red, yellow, etc it is needed to use "Confluence" hex color codes, e.g.

<span style="color: #ff5630;">Current PHP version is deprecated so please schedule its upgrade with the manager.</span>

p.s. Confluence-suitable hex codes can be retrieved from code inspector of Google Console or special plugins like Color Picker - https://chrome.google.com/webstore/detail/colorpick-eyedropper/ohcpnigalekghcmgcdcenkpelffpdolg

Bill Bailey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 7, 2020

Code inspector is your friend. You often have to see how a page is actually rendering to know how to fix CSS/formatting issues.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events