[wp-trac] [WordPress Trac] #33876: Centering multiple images in one row in Wordpress is badly broken and has been for a while

WordPress Trac noreply at wordpress.org
Sun Dec 20 00:28:15 UTC 2015


#33876: Centering multiple images in one row in Wordpress is badly broken and has
been for a while
-------------------------+-----------------------------
 Reporter:  archon810    |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Future Release
Component:  TinyMCE      |     Version:  3.9
 Severity:  normal       |  Resolution:
 Keywords:  needs-patch  |     Focuses:
-------------------------+-----------------------------
Changes (by azaozz):

 * keywords:   => needs-patch
 * version:  4.3 => 3.9
 * type:  defect (bug) => enhancement
 * milestone:  Awaiting Review => Future Release


Comment:

 I believe this is a result from a tradeoff. The choices are either to
 align center multiple images or maintain center alignment when image
 caption is added. Since captions are more common, that got priority.

 Don't think we can change this for all images without breaking the current
 behaviour for captions, or the current styling in many themes that expect
 `img.aligncenter`.

 It seems possible to look at the selection when processing the click on
 the "Align center" button and add inline style when there are more than
 one images selected. If this is added, will need to determine what the
 best behaviour would be when caption is added to one of these images.

 For now the easiest workaround is to click in the `p` in the element path
 (at the bottom of the editor, shown when the toolbar is expanded) and then
 click the "Align center" button.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33876#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list