Consider allowing shortcode content to be imported as InnerBlocks #6020
Labels
Needs Testing
Needs further testing to be confirmed.
[Type] Enhancement
A suggestion for improvement.
Issue Overview
A helpful addition to the block transform API would be the ability to convert the text content of a shortcode to
InnerBlocks
within a nested block.As a generic example, given a shortcode like this:
Converting to a section block (see #4900) could transform the shortcode’s content into inner blocks within the new section block.
Expected Behavior
There is a path for transforming shortcode content into
InnerBlocks
.Current Behavior
Shortcode content (
source: 'text'
) can only be used as an attribute, and as far as I can tell attributes cannot be used to populateInnerBlocks
.Possible Solution
A transform
from
object could support aninnerBlocks
property, like so:The block transform API would then attempt to convert the shortcode content into blocks which would populate the new block's
InnerBlocks
.Related Issues and/or PRs
The text was updated successfully, but these errors were encountered: