Problems with Formatting when Content is Pasted from an Unknown Source
Platform Notice: Cloud and Data Center - This article applies equally to both cloud and data center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Symptoms
Users experience the following errors in the Confluence editor when they copy and paste external content into Confluence:
- Font color might change from the default color that you are currently using
- Cursor might disappear as soon as you paste content
Example of error:
Diagnosis
Install the Confluence Source Editor from Atlassian Marketplace. Edit the page in question and launch the source editor by clicking the button on the editor toolbar. Look for extra <span>
tags like the following example:
<span style="color: rgb(0,0,0);"> </span>
Cause
Additional span tags can disrupt page styles when Confluence renders content following the extraneous tags. Since Confluence only understands custom tags that it uses to render a page, any unknown special characters could cause Confluence to render these tags with errors.
Resolution
- Install the free Confluence Source Editor, which will allow you to view the underlying storage format of a page.
Remove unnecessary span tags.
Save the page.
Be careful when copying/pasting external content as it could contain extra HTML elements that trigger this issue.
The scope of this issue could be large, especially if your users often copy/paste external content into Confluence. Furthermore, it's possible that one block of pasted text could contain multiple <span>
tags, so be sure to remove all of the offending tags.