Opened 9 years ago

Last modified 9 years ago

#13157 confirmed Bug

Enhanced Image plugin alignClasses don't work when image assigned a link

Reported by: Nicholas Wright Owned by:
Priority: Normal Milestone:
Component: General Version: 4.4.0
Keywords: Cc:


I've managed to reproduce this bug with the latest nightly build, as follows:

  1. Download the nightly build.
  2. Download and include the following plugin:
  3. Download an include the additional required plugins:
  4. Add the following to config.js:

config.extraPlugins = 'lineutils'; config.extraPlugins = 'widget'; config.extraPlugins = 'image2'; config.image2_alignClasses = [ 'text-editor-image-left', 'text-editor-image-center', 'text-editor-image-right' ];

  1. Add the following to content.css:

.text-editor-image-left {

float: left; margin-right: 10px;

} .text-editor-image-right {

float: right;

margin-left: 10px;


  1. Open one of the samples: Desktop/ckeditor/samples/replacebyclass.html
  2. Double click an image to open the dialog and select Alignment: Right
    • The image floats to the right.
  3. Toggle Source mode on/off
    • The image remains floated to the right.
  4. Select the image and click the Link icon, and add a URL.
    • The image remains floated right.
  5. Toggle the Source mode on/off.
    • The image loses its float right.
    • If you view source mode you'll see that the image is still assigned the correct class, it's just not being detected.
    • If you double click the image to open the dialog the Alignment: Right option is NOT selected.

Attachments (2)

image2.html (2.1 KB) - added by Jakub Ś 9 years ago.
contents2.css (1.9 KB) - added by Jakub Ś 9 years ago.

Download all attachments as: .zip

Change History (3)

comment:1 Changed 9 years ago by Jakub Ś

Keywords: image2 Enhanced Image alignClasses removed
Status: newconfirmed
Version: 4.4.8 (GitHub - master)4.4.0

Problem can be reproduced from CKEditor 4.4.

When using style="float:right;" it is copied to wrapping span. When, on the other hand using, classes like text-editor-image-right and switching to source and back (initially class is there) they are not copied to wrapping span and only kept on the image.

Changed 9 years ago by Jakub Ś

Attachment: image2.html added

Changed 9 years ago by Jakub Ś

Attachment: contents2.css added
Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy