-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert newlines between inline elements to a space
At the moment, if you paste the following HTML, the newline between the `<span>` elements is incorrectly discarded. ```html <span>foo</span> <span>bar</span> ``` This will currently insert `foobar` into Quill, when we'd expect `foo bar`, since newlines should [treated as spaces][1] between inline elements (such as `<span>`). This change updates the `matchText()` clipboard matcher to check if the text node is between inline elements or not before early-returning. [1]: https://developer.mozilla.org/en-US/docs/Web/API/Document_Object_Model/Whitespace
- Loading branch information
1 parent
7aa6189
commit 0a745ee
Showing
3 changed files
with
40 additions
and
1 deletion.
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
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