diff --git a/tinymce-single/tinymce/block.js b/tinymce-single/tinymce/block.js index 19b4e4ad9476e9..8badd89e3a1f5e 100644 --- a/tinymce-single/tinymce/block.js +++ b/tinymce-single/tinymce/block.js @@ -205,6 +205,18 @@ .attr( 'data-wp-block-selected', null ); } ); + editor.on( 'keyup', function( event ) { + if ( event.keyCode === tinymce.util.VK.BACKSPACE ) { + var $empty = editor.$( editor.selection.getNode() ).find( ':empty' ); + + $empty.append( '
' ); + + if ( $empty.length ) { + editor.selection.setCursorLocation( $empty[0], 0 ); + } + } + } ); + // Attach block UI. editor.on( 'preinit', function() {