I’m trying to filter paragraph block behavior to always enable keepPlaceholderOnFocus.

I’m trying the filter blocks.registerBlockType as explained on this page https://wordpress.org/gutenberg/handbook/designers-developers/developers/filters/block-filters/.

But that filter only pass settings and block name. I was able to filter the placeholder text with this filter but not the keepPlaceholderOnFocus value.

Looking at the source code in block-library.js, it seems keepPlaceholderOnFocus is hard coded and can’t be filtered.

Is there a way to filter that?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.