[MGNLUI-6975] CKEditor removes superscript and subscript from Source mode Created: 07/Dec/21  Updated: 21/Jun/22  Resolved: 27/Dec/21

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: 6.2.13
Fix Version/s: 6.2.16

Type: Bug Priority: Neutral
Reporter: Leah Staniorski Assignee: Quach Hao Thien
Resolution: Fixed Votes: 0
Labels: VN-Maintenance
Remaining Estimate: Not Specified
Time Spent: 6.5h
Original Estimate: Not Specified

Attachments: File custom-ckeditor-config.js     PNG File script1.png     PNG File script2.png     PNG File script3.png     PNG File script4.png     PNG File script5.png     PNG File toursappfile.png    
Issue Links:
Relates
relates to MGNLUI-6976 CKEditor paste from word removes supe... Closed
relates to MGNLUI-6885 Upgrade to CKEditor 5 Open
relates to MGNLUI-6981 configJsFile path issue Closed
causality
is causing MGNLUI-7256 Strikethrough can't be used in richTe... Closed
dependency
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Release notes required:
Yes
Date of First Response:
Sprint: UI Maintenance 4
Story Points: 3

 Description   

Steps to reproduce

  • Open tours.yaml and add the following under the properties node:
    body:
    source:true

(see toursappfile screenshot)

  • Go to Tours app and edit a tour
  • Once in edit mode, edit the body of the tour (the rich text field). Click the Source button in the toolbar. Insert the following:
<html>
<body>

<h1>The sub and sup elements</h1>
<p>This text contains <sub>subscript</sub> text. </p>
<p>This text contains <sup>superscript</sup> text. </p>

</body>
</html>

See script1.

  • Click Source button again. See the superscript and subscript tags are not respected. See script2.
  • Click Source button again. See the superscript and subscript tags have been removed. See script3.

Expected results

The superscript and subscript should be respected. See script4 and script5.

Actual results

The superscript and subscript tags are not respected and are removed. See script2 and script3.

Workaround

Using a custom-ckeditor-config.js like the one attached fixed the issue for me.



 Comments   
Comment by Roman Kovařík [ 10/Dec/21 ]

Estimated: timebox investigation.

Comment by Quach Hao Thien [ 27/Dec/21 ]

For RN:

  • Fix RichTextField suppresses superscript and subscript from Source mode
  • Subscript, Superscript formats are added to toolbar
Generated at Mon Feb 12 09:41:53 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.