-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pasted copy with carriage returns doesn't render the carriage returns #1681
Comments
Developers can write custom deserializer rules in their paste handlers that convert '\r' to newline at least as a work around. |
Could be solved here:
I'm not sure what the most standard behavior is though. I know nothing about the differences between |
In terms of OS, the enter representation is:
When doing a search replace, I search for |
@thesunny but shouldn't we fix this in the |
Oops, sorry, I actually hit the wrong button. I didn't mean to close this! |
My naive solution about this: |
I'm fairly sure this is still an issue for the basic plaintext pasting. If anyone wants to help solve this, I think it would involve changing the default logic to split on any of the line break combinations instead of just |
It looks like this issue is also occurring with plain text with normal I opened a PR to fix both styles of newlines: #3472 |
bug
What's the current behavior?
When pasting existing copy with solo carriage returns
\r
these aren't rendered by SlateJSGiven
This has a different new line\r\r\r\rThis is the final line.
in the clipboard when pasting into Slate no lines are rendered as shown below.SlateJS vs Draft JS
![feb-28-2018 14-12-16](https://user-images.githubusercontent.com/976274/36792096-70381ec4-1c91-11e8-82fb-98ada28dec35.gif)
What's the expected behavior?
That the carriage returns are correctly rendered as shown in Draft JS
The text was updated successfully, but these errors were encountered: