You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been playing a bit on how our themes can create Gutenberg templates but I've noticed that I am not able to set a specific alignment (wide or full) for nested or simple block.
In the handbook is present an array( 'align', 'left' ) but if I set it to wide in a column block Gutenberg stops working and I get the TunyMCE editor (btw congrats for the fallback).
I've been reading the issues of this repo and the handbook but I didn't find any documentation about it.
Steps to Reproduce (for bugs)
Create a CPT
Set a template for the CPT
Expected Behavior
I would like to be able to declare on a per post basis if the current block for the template needs to
Current Behavior
The user can change the alignment of a column block as he likes.
Possible Solution
Insert a new item inside the template array named align or more meaningful names in order to declare something like this:
$args = array(
'public' => true,
'label' => 'Books',
'template' => array(
array('core/columns',
array(), // Why is it empty? // Proposal array( 'align', 'wide' ), as for standard templatearray(
array('core/image', array('layout' => 'column-1')),
array('core/heading', array(
'placeholder' => 'Add Author...',
'layout' => 'column-2'
)),
array('core/paragraph', array(
'placeholder' => 'Add a inner paragraph',
'layout' => 'column-2'
)),
))
),
);
Issue Overview
I've been playing a bit on how our themes can create Gutenberg templates but I've noticed that I am not able to set a specific alignment (wide or full) for nested or simple block.
In the handbook is present an
array( 'align', 'left' )
but if I set it towide
in a column block Gutenberg stops working and I get the TunyMCE editor (btw congrats for the fallback).I've been reading the issues of this repo and the handbook but I didn't find any documentation about it.
Steps to Reproduce (for bugs)
Expected Behavior
I would like to be able to declare on a per post basis if the current block for the template needs to
Current Behavior
The user can change the alignment of a column block as he likes.
Possible Solution
Insert a new item inside the
template
array namedalign
or more meaningful names in order to declare something like this:Related Issues and/or PRs
#4383 #4747
The text was updated successfully, but these errors were encountered: