You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 6, 2023. It is now read-only.
I fixed the copy issue manually by checking to see if the browser is IE11, setting up copy / cut event listeners on the document, checking to ensure that some parent node of the copy / cut target was our draft editor, and manually placing the correct plaintext into the clipboard via window.clipboardData.setData('Text', selectedContentState.getPlainText());. If this doesn't sound too dumb, I could create a PR with this approach
Cut, copy, and paste are rather difficult and we found that Draft's support was lacking in several ways. In our fork we have a separate div next to the editor that accepts the paste event and then we steal the data after it has been pasted. The initial implementation (with bugs that later PRs fixed) is https://github.com/textioHQ/draft-js/pull/21/files. We have a third div that we use to support copy operations for IE as well...
Unlikely. That would require time that I don't have to invest here and a larger discussion with the Draft team because our changes affect copy/paste pretty significantly. It's not clear if those changes would be something that they'd want more generally.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
There are two bugs here:
It should preserve the newlines exactly as they were copied.
Which versions of Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draft.js?
Latest Draft.js, tested on Windows 7 IE11
The text was updated successfully, but these errors were encountered: