diff --git a/packages/block-library/src/preformatted/transforms.js b/packages/block-library/src/preformatted/transforms.js index 357ee93fe7ff0..38df8799960ec 100644 --- a/packages/block-library/src/preformatted/transforms.js +++ b/packages/block-library/src/preformatted/transforms.js @@ -35,6 +35,11 @@ const transforms = { transform: ( attributes ) => createBlock( 'core/paragraph', attributes ), }, + { + type: 'block', + blocks: [ 'core/code' ], + transform: ( attributes ) => createBlock( 'core/code', attributes ), + }, ], }; diff --git a/packages/e2e-tests/fixtures/block-transforms.js b/packages/e2e-tests/fixtures/block-transforms.js index 8ca165dfcfd1d..a62c6cdc2db7e 100644 --- a/packages/e2e-tests/fixtures/block-transforms.js +++ b/packages/e2e-tests/fixtures/block-transforms.js @@ -278,7 +278,7 @@ export const EXPECTED_TRANSFORMS = { }, core__preformatted: { originalBlock: 'Preformatted', - availableTransforms: [ 'Group', 'Paragraph' ], + availableTransforms: [ 'Group', 'Paragraph', 'Code' ], }, core__pullquote: { originalBlock: 'Pullquote',