-
Type:
Bug
-
Resolution: Fixed
-
Priority:
High
-
Component/s: Page - Editor - Legacy (TinyMCE)
-
12
-
Minor
-
5
Issue Summary
Legacy pages or templates with nested span elements, specifically text color and background color can be converted to the new editor, even though these elements are not supported. Converting pages with these elements will result in a broken page.
This issue was observed also on texts where there are no nested spans, but has the text and background color on the same span.
Steps to Reproduce
- Create a legacy page with the following storage format:
<p> <span style="color: rgb(112,112,112);"> <span style="background-color: rgb(245,245,245);"> <em>Emphasized text</em> </span> </span> </p>
2. Attempt to convert the page to the new editor
Other reproducible scenarios:
- Create a page using the current editor
- Try to add the background color by highlighting the text you want
- Try adding the text color after the background color was added
- Create a page using the Confluence REST API (v1 and v2)
- Add a span tag to add the color to the background and the text color
For example:
<p>
<span style="color: blue;background-color: yellow;">Styled text</span>
</p>
Third scenario:
- Create a page using the legacy editor
- Try to add the background color by highlighting the text you want
- Try adding the text color after the background color was added
- Create a page using the Confluence REST API (v1 and v2)
- Add a span tag to add the color to the background and the text color
- Convert the page to the current editor
Expected Results
The user should either be prompted with a message indicating that this page is not eligible to be converted to the new editor, or support is added for these elements.
Actual Results
The page goes blank in edit mode and all content is gone.
In some cases the user is still able to convert, resulting in a broken page due to this error:
RangeError: Invalid collection of marks for node text: em,textColor,backgroundColor
Workaround
Remove the nested span elements with text color/background color before converting the page.