We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3bfbacd commit 594b5b1Copy full SHA for 594b5b1
packages/block-editor/src/components/writing-flow/use-clipboard-handler.js
@@ -215,6 +215,11 @@ export default function useClipboardHandler() {
215
if ( canInsertBlockType( block.name, rootClientId ) ) {
216
newBlocks.push( block );
217
} else {
218
+ // If a block cannot be inserted in a root block, try
219
+ // converting it to that root block type and insert the
220
+ // inner blocks.
221
+ // Example: paragraphs cannot be inserted into a list,
222
+ // so convert the paragraphs to a list for list items.
223
const rootBlockName = getBlockName( rootClientId );
224
const switchedBlocks =
225
block.name !== rootBlockName
0 commit comments