Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update heading block behaviour on ENTER key to create empty paragraph…
… instead of heading (WordPress#10326) The onSplit method for the heading block will now replace an empty heading block with an empty paragraph block for the 'before' content. This allows the ENTER key pressed at the beginning of a heading to create an empty paragraph above it. Also, when the ENTER key is pressed at the end of a heading, an empty paragraph block is created below, instead of another heading block. The RichText component now also calls event.stopImmediatePropagation() before splitContent() to prevent TinyMCE from throwing an error. This avoids a similar error as in WordPress#4580.
- Loading branch information