updating block with core blocks

This commit is contained in:
Antoine M 2024-04-08 14:43:44 +02:00
parent d2ca595bd9
commit 89052b172e
4 changed files with 18 additions and 7 deletions

View File

@ -1 +1 @@
<?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '6ca461874bc5f11cea56'); <?php return array('dependencies' => array('react', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '0313ca693e8c9b6cd60a');

View File

@ -166,13 +166,14 @@ function Edit({
className: `section_titling section_titling--${textAlign}` className: `section_titling section_titling--${textAlign}`
}) })
}, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InnerBlocks, { }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InnerBlocks, {
allowedBlocks: ["core/paragraph", "core/list", "core/heading"], allowedBlocks: ["core/heading", "homegrade-content-blocks/content-heading", "core/paragraph"],
templateLock: "contentOnly", templateLock: "insert",
template: [["core/heading", { template: [["core/heading", {
placeholder: "Titre de section", placeholder: "Titre de section",
level: 3, level: 3,
className: "section_titling__title" className: "section_titling__title"
}], ["core/paragraph", { }], ["core/paragraph", {
placeholder: "Tapez votre sous-titre...",
className: "section_titling__subtitle" className: "section_titling__subtitle"
}]] }]]
}))); })));

File diff suppressed because one or more lines are too long

View File

@ -51,8 +51,12 @@ export default function Edit({ attributes, setAttributes, clientId }) {
})} })}
> >
<InnerBlocks <InnerBlocks
allowedBlocks={["core/paragraph", "core/list", "core/heading"]} allowedBlocks={[
templateLock="contentOnly" "core/heading",
"homegrade-content-blocks/content-heading",
"core/paragraph",
]}
templateLock="insert"
template={[ template={[
[ [
"core/heading", "core/heading",
@ -62,7 +66,13 @@ export default function Edit({ attributes, setAttributes, clientId }) {
className: "section_titling__title", className: "section_titling__title",
}, },
], ],
["core/paragraph", { className: "section_titling__subtitle" }], [
"core/paragraph",
{
placeholder: "Tapez votre sous-titre...",
className: "section_titling__subtitle",
},
],
]} ]}
/> />
</div> </div>