Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-6975

CKEditor removes superscript and subscript from Source mode

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 6.2.16
    • 6.2.13
    • None

      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.

        Acceptance criteria

          1. custom-ckeditor-config.js
            4 kB
          2. script1.png
            script1.png
            152 kB
          3. script2.png
            script2.png
            136 kB
          4. script3.png
            script3.png
            137 kB
          5. script4.png
            script4.png
            75 kB
          6. script5.png
            script5.png
            78 kB
          7. toursappfile.png
            toursappfile.png
            220 kB

              thien.quach Quach Hao Thien
              lstaniorski Leah Staniorski
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - Not Specified
                    Not Specified
                    Logged:
                    Time Spent - 6.5h
                    6.5h