Quill: Copy/paste text from (MS Word/MS Outlook) magically creates new newlines.

Created on 27 Feb 2018  路  4Comments  路  Source: quilljs/quill

If I copy text from my Quill editor to Microsoft Word/Microsoft Outlook, then it's works. But if I want copy back these text from Microsoft Word/Microsoft Outlook to Quill editor, then new newlines seem to be inserted into the text. My Quill editor has a 100% width (1800px), and I don't use any specific options (matchVisual, addMatcher, etc.) from Quill.

Steps for Reproduction

  1. Visit https://quilljs.com/docs/formats/
  2. Open MS Word/MS Outlook, put any text, that does not contain any newlines, but it is long enough to wrap
  3. Copy text from MS Word/MS Outlook to Quill editor

Text in Word:
word

Expected behavior:

  • there should be no newlines in the text

quill_good

Actual behavior:

  • quill creates new newlines

quill

Tested Platforms:

  • windows 10 64Bit, Chrome 63.

Version:

  • quill Version: 1.3.4

Most helpful comment

Here is minimal example https://codepen.io/DmitrySkripkin/pen/BPbOyR just paste content from word to see the difference.
This is not related to quill, just make sure that .ql-clipboard has white-space: normal.

All 4 comments

Can you help me please?

@jhchen.

@szerleticsi mine was caused by white-space: pre-wrap; on class="ql-editor". Removing the style solved my problem.

Here is minimal example https://codepen.io/DmitrySkripkin/pen/BPbOyR just paste content from word to see the difference.
This is not related to quill, just make sure that .ql-clipboard has white-space: normal.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

visore picture visore  路  3Comments

rsdrsd picture rsdrsd  路  3Comments

aletorrado picture aletorrado  路  3Comments

lastmjs picture lastmjs  路  3Comments

sferoze picture sferoze  路  3Comments