diff --git a/docs/designers-developers/developers/richtext.md b/docs/designers-developers/developers/richtext.md index 6e0752f64f8752..e662ce41b7cf94 100644 --- a/docs/designers-developers/developers/richtext.md +++ b/docs/designers-developers/developers/richtext.md @@ -49,7 +49,6 @@ wp.blocks.registerBlockType( /* ... */, { props.setAttributes( { content: content } ); // Store updated content as a block attribute }, placeholder: __( 'Heading...' ), // Display this text before any content has been added by the user - keepPlaceholderOnFocus: true // Keep the placeholder text showing even when the field is focused (leave this property off to remove placeholder content on focus) } ); }, @@ -85,7 +84,6 @@ registerBlockType( /* ... */, { formattingControls={ [ 'bold', 'italic' ] } // Allow the content to be made bold or italic, but do not allow other formatting options onChange={ ( content ) => setAttributes( { content } ) } // Store updated content as a block attribute placeholder={ __( 'Heading...' ) } // Display this text before any content has been added by the user - keepPlaceholderOnFocus // Keep the placeholder text showing even when the field is focused (leave this property off to remove placeholder content on focus) /> ); }, diff --git a/packages/block-editor/src/components/rich-text/README.md b/packages/block-editor/src/components/rich-text/README.md index 9cc0b3e93fccdd..e271bc5200e658 100644 --- a/packages/block-editor/src/components/rich-text/README.md +++ b/packages/block-editor/src/components/rich-text/README.md @@ -53,10 +53,6 @@ Render a rich [`contenteditable` input](https://developer.mozilla.org/en-US/docs *Optional.* Whether to show the input is selected or not in order to show the formatting controls. By default it renders the controls when the block is selected. -### `keepPlaceholderOnFocus: Boolean` - -*Optional.* By default, the placeholder will hide as soon as the editable field receives focus. With this setting it can be be kept while the field is focussed and empty. - ### `autocompleters: Array` *Optional.* A list of autocompleters to use instead of the default. diff --git a/packages/block-editor/src/components/rich-text/index.js b/packages/block-editor/src/components/rich-text/index.js index 8a3ef0550045bc..0c501ddd8a1c1e 100644 --- a/packages/block-editor/src/components/rich-text/index.js +++ b/packages/block-editor/src/components/rich-text/index.js @@ -293,7 +293,6 @@ class RichTextWrapper extends Component { isSelected: originalIsSelected, onCreateUndoLevel, placeholder, - keepPlaceholderOnFocus, // eslint-disable-next-line no-unused-vars allowedFormats, withoutInteractiveFormatting, @@ -340,7 +339,6 @@ class RichTextWrapper extends Component { wrapperClassName={ classnames( wrapperClasses, wrapperClassName ) } className={ classnames( classes, className ) } placeholder={ placeholder } - keepPlaceholderOnFocus={ keepPlaceholderOnFocus } allowedFormats={ adjustedAllowedFormats } withoutInteractiveFormatting={ withoutInteractiveFormatting } onEnter={ this.onEnter } diff --git a/packages/block-editor/src/components/rich-text/index.native.js b/packages/block-editor/src/components/rich-text/index.native.js index 61cbf2551751a1..ccb5e0d15bf7ec 100644 --- a/packages/block-editor/src/components/rich-text/index.native.js +++ b/packages/block-editor/src/components/rich-text/index.native.js @@ -49,7 +49,6 @@ function RichTextWraper( { isSelected: originalIsSelected, onCreateUndoLevel, placeholder, - keepPlaceholderOnFocus, // From experimental filter. ...experimentalProps } ) { @@ -68,7 +67,6 @@ function RichTextWraper( { wrapperClassName={ classnames( wrapperClasses, wrapperClassName ) } className={ classnames( classes, className ) } placeholder={ placeholder } - keepPlaceholderOnFocus={ keepPlaceholderOnFocus } __unstableIsSelected={ originalIsSelected } //__unstablePatterns={ getPatterns() } //__unstableEnterPatterns={ getEnterPatterns() } diff --git a/packages/block-library/src/button/edit.js b/packages/block-library/src/button/edit.js index a5f70204d6557c..967dc29c9e44cb 100644 --- a/packages/block-library/src/button/edit.js +++ b/packages/block-library/src/button/edit.js @@ -127,7 +127,6 @@ class ButtonEdit extends Component { backgroundColor: backgroundColor.color, color: textColor.color, } } - keepPlaceholderOnFocus /> setAttributes( { fileName: text } ) } /> @@ -225,7 +224,6 @@ class FileEdit extends Component { value={ downloadButtonText } withoutInteractiveFormatting placeholder={ __( 'Add text…' ) } - keepPlaceholderOnFocus onChange={ ( text ) => setAttributes( { downloadButtonText: text } ) } /> diff --git a/packages/block-library/src/search/edit.js b/packages/block-library/src/search/edit.js index 40834ab63f3ab3..81c2ec63d8acb4 100644 --- a/packages/block-library/src/search/edit.js +++ b/packages/block-library/src/search/edit.js @@ -13,7 +13,6 @@ export default function SearchEdit( { className, attributes, setAttributes } ) { wrapperClassName="wp-block-search__label" aria-label={ __( 'Label text' ) } placeholder={ __( 'Add label…' ) } - keepPlaceholderOnFocus withoutInteractiveFormatting value={ label } onChange={ ( html ) => setAttributes( { label: html } ) } @@ -33,7 +32,6 @@ export default function SearchEdit( { className, attributes, setAttributes } ) { className="wp-block-search__button-rich-text" aria-label={ __( 'Button text' ) } placeholder={ __( 'Add button text…' ) } - keepPlaceholderOnFocus withoutInteractiveFormatting value={ buttonText } onChange={ ( html ) => setAttributes( { buttonText: html } ) }