VaguelySerious / react-quill

A Quill component for React.
https://zenoamaro.github.io/react-quill/
MIT License
47 stars 15 forks source link

multiple spaces convert to single space #15

Open ToktogonovA opened 1 week ago

ToktogonovA commented 1 week ago

Hello, I'm encountering an issue where, upon pasting text into the editor, all multiple spaces are reduced to a single space, and I can't use the tab function. Additionally, the bullet list behaves strangely, as it gets converted to a numbered list when inserted into a div. The bullet list is exported as an ol instead of a ul. Previously, I used react-quill v2, where everything worked correctly. What could be causing this problem? Tab -> single space Multiple spaces -> single space bullet list -> ordered list

have text inside a div. After clicking the edit icon, the editor opens, the text is loaded into the editor, and all multiple spaces are replaced by a single space.

Снимок экрана 2024-11-07 в 13 05 51

in edit mode:

Снимок экрана 2024-11-07 в 13 09 15

bullet list in edit mode:

Снимок экрана 2024-11-07 в 13 10 06

bullet list after saving:

Снимок экрана 2024-11-07 в 13 10 47

I tried using preserveWhitespace={true} and white-space: pre-wrap, but it didn’t help.

piotrziolko commented 1 week ago

related issues:

https://github.com/KillerCodeMonkey/ngx-quill/issues/1848 https://github.com/slab/quill/issues/4108