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

WordPress Trac noreply at wordpress.org
Mon Jul 1 14:41:24 UTC 2019


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

 * status:  new => closed
 * resolution:   => maybelater


Old description:

> I've been meaning to start a ticket like this for a while, and it's
> finally time to do it.
>
> Using multiple images in a single paragraph/row in Wordpress is a
> relatively common occurrence on our blog (androidpolice.com), but doing
> it in TinyMCE is a big pain.
>
> Problem 1: Aligncenter image class gets applied to the image itself, not
> to the containing p tag, thus multiple centered images occupy full rows,
> one image each. To the writer, it's even more confusing because they
> can't press backspace from the beginning of the 2nd image to join it with
> the first - nothing happens. Aligncenter is a really evil class IMO, as
> it takes over the whole line.
>
> Problem 2: Selecting multiple images and clicking Center, applies the
> class only to one of them at best, which is completely counter-intuitive.
> Unless an image is explicitly selected, this should instead apply the
> center to the whole containing paragraph. In fact, this should happen as
> long as the cursor is not on an image, no matter if the row is selected
> and highlighted or not. See Windows Live Writer for doing it the right
> way.
>
> There are countless threads confused by this implementation, attempting
> to fix it or get around it, but the only thing people have figured out so
> far is creating a line above the images, putting some text into it,
> center aligning, then dropping the images into the pre-centered
> paragraph. This is basically an ugly hack in my opinion and requires
> coaching of every writer.
>
> I believe TinyMCE can get this resolved properly and benefit everyone
> using Wordpress. What do you think, guys?
>
> Just go play around with centering images, and you'll see how frustrating
> and unpredictable it is.

New description:

 I've been meaning to start a ticket like this for a while, and it's
 finally time to do it.

 Using multiple images in a single paragraph/row in WordPress is a
 relatively common occurrence on our blog (androidpolice.com), but doing it
 in TinyMCE is a big pain.

 Problem 1: Aligncenter image class gets applied to the image itself, not
 to the containing p tag, thus multiple centered images occupy full rows,
 one image each. To the writer, it's even more confusing because they can't
 press backspace from the beginning of the 2nd image to join it with the
 first - nothing happens. Aligncenter is a really evil class IMO, as it
 takes over the whole line.

 Problem 2: Selecting multiple images and clicking Center, applies the
 class only to one of them at best, which is completely counter-intuitive.
 Unless an image is explicitly selected, this should instead apply the
 center to the whole containing paragraph. In fact, this should happen as
 long as the cursor is not on an image, no matter if the row is selected
 and highlighted or not. See Windows Live Writer for doing it the right
 way.

 There are countless threads confused by this implementation, attempting to
 fix it or get around it, but the only thing people have figured out so far
 is creating a line above the images, putting some text into it, center
 aligning, then dropping the images into the pre-centered paragraph. This
 is basically an ugly hack in my opinion and requires coaching of every
 writer.

 I believe TinyMCE can get this resolved properly and benefit everyone
 using Wordpress. What do you think, guys?

 Just go play around with centering images, and you'll see how frustrating
 and unpredictable it is.

--

Comment:

 This is (perhaps) a good idea for a block: "Images Row" or "Row of
 Images". Would be an alternate way to display images.

 This seems superseded by the block editor. Best to fix/handle it there
 imho. Please open an issue/feature request on GH:
 https://github.com/WordPress/gutenberg, or even better: make the block if
 possible and release it as a plugin.

 Closing as maybelater as this seems like a good idea for another block for
 the block editor.

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


More information about the wp-trac mailing list