Uploaded image for project: '{RETIRED} CKEditor Integration'
  1. {RETIRED} CKEditor Integration
  2. CKEDITOR-73

CKEditor is not center-aligning table that's copied from a Word file where it is center-aligned

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.12
    • 1.6.1
    • None
    • None

    Description

      See the attached word-file. It's a copy-paste of 'Apollo-11' article from Wikipedia.

      There's a center-aligned table. When you copy-paste it in the CKEditor, the table displays as center-aligned in the WYSIWYG editor, which is great!

      But as soon as you save the page or preview, it gets left aligned.

      Looking a bit closer, the styles of the table when displayed in WYSIWYG mode and when in save/preview mode appear slightly different, which seems unexpected. In WYSIWYG mode, there's an attribute 'align:center' applied on the table element. In Save/Preview mode, that attribute is no longer displayed but got replaced with 'text-align:center' within the style tag.

      The problem also is that there appears to be no other way to center-align the table, so the user is kind of stuck in WYSIWYG mode. If you know of a short-term fix to make the table center-align, then that'll be great so we can tell our other users about it.

      I also tried this syntax as prescribed in the XWiki Syntax guide (http://lod.springer.com/wiki/bin/view/XWiki/XWikiSyntax) but that did not center-align the table:

      (% style="background-color:red;align=centerl;width:25%" %)
      |=Title 1|=(% style="background-color:yellow" %)Title 2
      |Word 1|Word 2
      

      Attachments

        1. Wiki UAT Word Exercise-4.docx
          19 kB
        2. view_mode.png
          view_mode.png
          101 kB
        3. edit_mode.png
          edit_mode.png
          68 kB
        4. CKEditorTableCenter.jpg
          CKEditorTableCenter.jpg
          17 kB
        5. add table.png
          add table.png
          87 kB

        Issue Links

          Activity

            People

              mflorea Marius Dumitru Florea
              chkumar Chetan Kumar
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: