diff --git a/packages/block-library/src/paragraph/edit.js b/packages/block-library/src/paragraph/edit.js index 551b0dded6dd00..c640b9e881cd13 100644 --- a/packages/block-library/src/paragraph/edit.js +++ b/packages/block-library/src/paragraph/edit.js @@ -176,6 +176,7 @@ function ParagraphBlock( { aria-label={ content ? __( 'Paragraph block' ) : __( 'Empty block; start writing or type forward slash to choose a block' ) } placeholder={ placeholder || __( 'Start writing or type / to choose a block' ) } __unstableEmbedURLOnPaste + __unstableAllowPrefixTransformations /> diff --git a/packages/rich-text/src/component/index.js b/packages/rich-text/src/component/index.js index e7ca26cc315cb9..f7de65728749fe 100644 --- a/packages/rich-text/src/component/index.js +++ b/packages/rich-text/src/component/index.js @@ -446,6 +446,7 @@ class RichText extends Component { const { __unstableInputRule: inputRule, __unstableMarkAutomaticChange: markAutomaticChange, + __unstableAllowPrefixTransformations: allowPrefixTransformations, formatTypes, setTimeout, clearTimeout, @@ -455,6 +456,10 @@ class RichText extends Component { clearTimeout( this.onInput.timeout ); this.onInput.timeout = setTimeout( this.onCreateUndoLevel, 1000 ); + if ( ! allowPrefixTransformations ) { + return; + } + // Only run input rules when inserting text. if ( inputType !== 'insertText' ) { return;