Gutenberg: How can I disable backspace key from deleting an empty paragraph block?
After trial and error, I’ve figured out a way. It may not be perfect but it works for every circumstance I’ve tried. We need to use the wp.data.select function, and select the ‘core/block-editor’, and finally use the getSelectionStart() function. That will tell us if the current block has selectable text, and if so, where our … Read more