handling inner anchors

This commit is contained in:
Antoine M 2023-11-24 19:05:36 +01:00
parent 6795dfaf2e
commit 4c15907707
6 changed files with 16 additions and 4 deletions

View File

@ -1 +1 @@
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '585c32b2534a1b8eeb09'); <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '55aaaaa96d363ec8c816');

View File

@ -307,8 +307,12 @@ function save({
attributes, attributes,
setAttributes setAttributes
}) { }) {
var blockProps = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps.save();
// return el("div", blockProps, el(InnerBlocks.Content));
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
className: "innerblocks" ..._wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.useBlockProps.save({
className: `innerblocks`
})
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks.Content, null)); }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_1__.InnerBlocks.Content, null));
} }

File diff suppressed because one or more lines are too long

View File

@ -9,6 +9,7 @@ $customImageUrl = $attributes['imageUrl'] ?? null;
$customImageAlt = $attributes['imageAlt'] ?? null; $customImageAlt = $attributes['imageAlt'] ?? null;
$customTitle = $attributes['blockCustomTitle'] ?? null; $customTitle = $attributes['blockCustomTitle'] ?? null;
?> ?>

View File

@ -9,6 +9,7 @@ $customImageUrl = $attributes['imageUrl'] ?? null;
$customImageAlt = $attributes['imageAlt'] ?? null; $customImageAlt = $attributes['imageAlt'] ?? null;
$customTitle = $attributes['blockCustomTitle'] ?? null; $customTitle = $attributes['blockCustomTitle'] ?? null;
?> ?>

View File

@ -2,8 +2,14 @@ import { useBlockProps, RichText, InnerBlocks } from "@wordpress/block-editor";
import { __ } from "@wordpress/i18n"; import { __ } from "@wordpress/i18n";
export default function save({ attributes, setAttributes }) { export default function save({ attributes, setAttributes }) {
var blockProps = useBlockProps.save();
// return el("div", blockProps, el(InnerBlocks.Content));
return ( return (
<div className="innerblocks"> <div
{...useBlockProps.save({
className: `innerblocks`,
})}
>
<InnerBlocks.Content /> <InnerBlocks.Content />
</div> </div>
); );