WordPress / slides

Slides: Presentations with WordPress
https://wordpress.org/plugins/slide/
88 stars 28 forks source link

Should it be possible to insert a slide block into a slide block? #19

Open bobbingwide opened 4 years ago

bobbingwide commented 4 years ago

I created a new presentation slide and inserted a Slide block into the existing slide. Should I have been prevented from doing so?

<!-- wp:slide/slide -->
<section class="wp-block-slide-slide"><!-- wp:heading {"level":1} -->
<h1>Slide without slide</h1>
<!-- /wp:heading -->

<!-- wp:slide/slide -->
<section class="wp-block-slide-slide"><!-- wp:paragraph -->
<p>Slide within Slide</p>
<!-- /wp:paragraph --></section>
<!-- /wp:slide/slide --></section>
<!-- /wp:slide/slide -->
bobbingwide commented 4 years ago

BTW: I was being particularly dumb when I did this. At the time I hadn't actually realised how to create a slide show. I had created multiple presentations with one slide per CPT. It was not obvious to me that I needed to use the Slide block multiple times inside a presentation.

ellatrix commented 4 years ago

That should not be possible indeed. There's currently no API in the block editor to prevent certain blocks inside a particular block, but I'll find a way around it. :)

bobbingwide commented 4 years ago

Will you have to get a list of allowedBlocks and remove yours?
Or is it time for a PR for disallowedBlocks? https://github.com/WordPress/gutenberg/issues/7845#