zenoamaro/react-quill

Cannot store and display whitespace

Offen

#311 geöffnet am 02.01.2018

 (6 Kommentare) (5 Reaktionen) (0 zugewiesene Personen)JavaScript (860 Forks)batch import
enhancementhelp wanted

Repository-Metriken

Stars
 (6.238 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

I noticed a strange bug when attempting to save and re-render html from quill. I am using React Quill v1.2.3

Right now it is impossible to store and display a string with more than one tab or space in a row. Here is a link to a comment from LDFM who also experienced this same problem: https://github.com/quilljs/quill/issues/1751#issuecomment-336071574 LFDM pointed out that the line that is causing this issue is: https://github.com/zenoamaro/react-quill/blob/master/src/mixin.js#L68

Since dangerouslyPasteHTML is called, the whitespace get's collapsed down to a single space but jhchen's comment towards the end of that same issue linked above seems to point to a solution. https://github.com/quilljs/quill/issues/1751#issuecomment-338581862

Thanks for your help!

Contributor Guide