I've registered a custom block pattern using register_block_pattern
with several block elements, and I'd like to wrap the whole thing in a container element. When I add it to the content, however, it doesn't render correctly. Rather than wrapping the other block elements, as coded, it self-closes, and a grey "Classic" box shows in the editor. Is there a way to add extra html that isn't a registered block to a custom block pattern?
Example of the (unescaped) code and desired output (the .wrapper class is the added code):
<div class="wrapper">
<!-- wp:heading -->
<h1 class="has-text-align-center">Block 1</h1>
<!-- /wp:heading -->
<!-- wp:heading -->
<h5 class="has-text-align-center">Block 2</h5>
<!-- /wp:heading -->
</div>
Actual Result after adding the block pattern to a page:
<div class="wrapper"></div>
<!-- wp:heading -->
<h1 class="has-text-align-center">Block 1</h1>
<!-- /wp:heading -->
<!-- wp:heading -->
<h5 class="has-text-align-center">Block 2</h5>
<!-- /wp:heading -->