diff --git a/packages/block-library/src/paragraph/edit.js b/packages/block-library/src/paragraph/edit.js index e2ce500224dcea..983b92a1a15097 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 9984a7ac97695f..163d2ac59f84be 100644 --- a/packages/rich-text/src/component/index.js +++ b/packages/rich-text/src/component/index.js @@ -445,6 +445,7 @@ class RichText extends Component { const { __unstableInputRule: inputRule, __unstableMarkAutomaticChange: markAutomaticChange, + __unstableAllowPrefixTransformations: allowPrefixTransformations, formatTypes, setTimeout, clearTimeout, @@ -454,6 +455,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;