Closed jorostoyanov closed 1 month ago
I did some digging here and found some interesting caveats.
I compared the Convert to Blocks button from the Gutenberg Editor to the process from NCC.
By default, even if there isn't an actual p
tag around the Gallery, the Gutenberg Editor assumes there is and uses it in the conversion.
For example, if you have the following Post Content:
[gallery ids="24, 25, 26"]
The Gutenberg Editor assumes that the content is wrapped in paragraph tag like so <p>[gallery ids="24, 25, 26"]</p>
which is actually the default behaviour of the Classic Editor.
Because of that, the next step for the "Convert to Blocks" action button is to convert the content into Gallery Block.
However, with the NCC, this p
tag wrap assumption is missing and the logical next step is to convert to paragraph first.
Further Steps: Find out what causes the <p>
wrap assumption in the Gutenberg Editor and why it doesn't work the same way with NCC.
Describe the conversion bug When the Post Content contains a Gallery shortcode in the following format -
[gallery ids="24,25,26"]
, it doesn't get converted to Gallery Block.Instead, it gets wrapped in a Paragraph Block.
Expected behavior It is expected to convert the Gallery Shortcode into a Gallery Block.