Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#33477 closed defect (bug) (fixed)

TinyMCE: image caption break if the user changes the "Block format"

Reported by: azaozz Owned by: azaozz
Milestone: 4.4 Priority: normal
Severity: normal Version: 2.7
Component: TinyMCE Keywords:
Focuses: Cc:
PR Number:


To reproduce:

  • Select an image that has a caption.
  • Change the Block format (the drop-down on the second toolbar row) to <p>, <h1>, <h2>, etc.

Happens because the caption "wrapper tag" is changed. This is generally a user error, but we can try to correct it.

Attachments (1)

33477.patch (1.8 KB) - added by azaozz 4 years ago.

Download all attachments as: .zip

Change History (3)

4 years ago

#1 @azaozz
4 years ago

In 33477.patch: when converting images with captions from HTML elements to shortcodes, make the wrapper div optional.

This div is a left over. Still there for back-compat. It was used to make it possible to center images with captions in old IE where centering of block elements in contentEditable is broken.

Last edited 4 years ago by azaozz (previous) (diff)

#2 @azaozz
4 years ago

  • Owner set to azaozz
  • Resolution set to fixed
  • Status changed from new to closed

In 33834:

TinyMCE: fix replacing the image caption HTML with the shortcode when saving the content.
Fixes #33477.

Note: See TracTickets for help on using tickets.