Table's figcaption/caption elements are not persisted when pasted into the editor #30876
Labels
[Block] Table
Affects the Table Block
[Feature] Paste
[Package] Blocks
/packages/blocks
[Priority] Low
Used to indicate that the issue at hand isn't a top priority to address and can be handled later
[Type] Bug
An existing feature does not function as intended
Description
When pasting raw HTML into the editor, the
figcaption
element isn't properly persisted.This appears to be because the
figure
element isn't included when pasted in the first place, and this piece of code should have logic in place which attempts to movefigcaption
s into afigure
element if one does exist.Step-by-step reproduction instructions
figcaption
element is moved outside of the originalfigure
element.The behaviour is also replicable by pasting the formatted HTML into https://wordpress.org/gutenberg/
Expected behaviour
The
figcaption
should be present as a child of thefigure
.Actual behaviour
The
figcaption
is without a parent and subsequently converted into ap
tag.WordPress information
Device information
The text was updated successfully, but these errors were encountered: