Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-20652

Image id is persisted when adding a caption using CKEditor

    XMLWordPrintable

Details

    • Integration
    • Unknown
    • N/A
    • N/A

    Description

      Steps to reproduce:

      1. Insert an image without a caption into a document and save and view the document.
      2. Edit the document in the WYSIWYG editor and click the caption option in the image dialog. Save the document again.
      3. Edit the document again and switch to source mode (or edit in the "Wiki" editor)

      Expected result:

      There is no (% class="wikigeneratedid" %) in the source and no id attribute on the image.

      Actual result:

      There is a (% class="wikigeneratedid" %) in the line above the image and an id attribute on the image.

      This is because enabling the caption on an existing image in CKEditor moves the class from the image to the figure. We probably need to protect the class similar to how we treat the freestanding image class.

      For fixing existing documents with this content, I've created XRENDERING-706 but I think we should also fix the original issue in CKEditor.

      Attachments

        Issue Links

          Activity

            People

              MichaelHamann Michael Hamann
              MichaelHamann Michael Hamann
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: