-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore whitespace between pasted empty paragraphs
At the moment, when pasting HTML containing empty paragraphs with whitespace between them, the whitespace is incorrectly rendered. For example: ```html <p></p> <p></p> ``` will result in a Delta containing `' \n'` This happens because the clipboard's `isLine()` function assumes that any element without children is an embed (which isn't true for things like empty paragraphs). This change updates the `isLine()` check to check the node against the registry, and see if we have a matching `EmbedBlot` there.
- Loading branch information
1 parent
b3d1532
commit 9414493
Showing
2 changed files
with
23 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters