Jump to content

CKEditor Image plugin - Add alignment class always to the outermost tag


Juergen
 Share

Recommended Posts

At the moment: In the plugin.js of the image plugin for the CKEditor the alignment class for the image will be added in the following ways.

1) Image without link and without caption: alignment class will be added to the image tag - OK (outermost tag)

2) Image without link and with caption: alignment class will be added to the figure tag - OK(outermost tag)

3) Image with link and without caption: alignment class will be added to the img tag, but this is not the outermost tag - NOT OK

4) Image with link and with caption: alignment class will be added to the figure tag - OK (outermost tag)

Point 3:

The alignment class should always be added to the outermost tag (in this case the anchor tag), because it would make it much easier for markup manipulation via textformatter modules.

At the moment it is a very hard struggle if you want to work with image markup manipulation to get the image alignment to work.

So it would be great to change the plugin.js to add the alignment class always to the outermost tag of the image part.

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...