Wrapping Gutenberg Blocks with a div/section/article

Question

I would like to be able to create sections of blocks from within the Gutenberg editor. This way I can apply styles around groups of blocks.

The idea would be to either:

  • Nest one or more blocks within a container div/section/article
  • Add an opening tag before a block or group of blocks and a closing tag afterwards

I have tried adding a ‘Custom HTML’ block before and afterwards with opening/closing tags. This works apart from when revisiting the editor the you’re welcomed with a ‘This block contains unexpected or invalid content’ warning.

How can I achieve this?

0
LatestScoop 3 years 2020-03-25T12:50:59-05:00 0 Answers 97 views 0

Leave an answer

Browse
Browse