AI content breaks block when template is lock
-
Hi,
I’m having a custom block with template, which is locked.
Upon insertion the block it fails, I noticed it fails due to AI Content extension.
Tempalte declaration:export function templateWrapper(attributes) { return applyFilters( 'external-card-template', [ [ 'core/group', { className: 'post-link', layout: { inherit: false, }, templateLock: true, }, [ [ 'core/image', { id: attributes.imageId, className: 'post-featured-image', }, ], [ 'core/group', { className: 'card-info', align: 'full', templateLock: true, }, [ [ 'core/heading', { level: 2, className: 'post-title', content: attributes.title, }, ], [ 'core/paragraph', { className: 'post-excerpt', content: attributes.text, }, ], ], ], ], ], ], attributes, ); }
Usage:
<div {...blockProps}> <InnerBlocks template={TEMPLATE} allowedBlocks={ALLOWED_BLOCKS} /> </div>
The issue happens only when
templateLock
is set to true by default.
The issue does not happen when content is added manually in editor and then content lock is applied.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘AI content breaks block when template is lock’ is closed to new replies.