From 033a06f731c333f2c3fe066cc01c543614c34c30 Mon Sep 17 00:00:00 2001 From: Nik Tsekouras Date: Mon, 9 May 2022 17:25:58 +0300 Subject: [PATCH] [Block Library - Post Terms]: Insert defaultBlock on suffix end split (#40934) --- packages/block-library/src/post-terms/edit.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/block-library/src/post-terms/edit.js b/packages/block-library/src/post-terms/edit.js index b022ab1caa35f..996ccc1023ef6 100644 --- a/packages/block-library/src/post-terms/edit.js +++ b/packages/block-library/src/post-terms/edit.js @@ -15,7 +15,7 @@ import { useBlockDisplayInformation, RichText, } from '@wordpress/block-editor'; -import { createBlock } from '@wordpress/blocks'; +import { createBlock, getDefaultBlockName } from '@wordpress/blocks'; import { Spinner, TextControl } from '@wordpress/components'; import { useSelect } from '@wordpress/data'; import { __ } from '@wordpress/i18n'; @@ -148,7 +148,9 @@ export default function PostTermsEdit( { } tagName="span" __unstableOnSplitAtEnd={ () => - insertBlocksAfter( createBlock( 'core/paragraph' ) ) + insertBlocksAfter( + createBlock( getDefaultBlockName() ) + ) } /> ) }