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.
When copying from one draft editor and then pasting into another, I am seeing soft returns get stripped. The soft returns were '\n' characters added via
RichUtils.insertSoftNewline
.https://github.com/facebook/draft-js/blob/213cd764f61cc64552bddd672ae1748529d55333/src/model/modifier/RichTextEditorUtil.js#L82
Here is a small test that can be added to
convertFromHTMLToContentBlocks-test.js
which demonstrates the problem:result:
This happens on account of this line of code:
https://github.com/facebook/draft-js/blob/507925ad60638734872dba52efa2d0b66cd94e4b/src/model/encoding/convertFromHTMLToContentBlocks.js#L357
Is there a way we can change this behavior to handle copy paste between draft editors?
Which versions of Draft.js, and which browser / OS are affected by this issue? Did this work in previous versions of Draft.js?
0.11.0-alpha
Chrome, MacOS
The text was updated successfully, but these errors were encountered: