Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double space is removed on paste #4143

Open
Kashkovsky opened this issue Apr 26, 2024 · 1 comment
Open

Double space is removed on paste #4143

Kashkovsky opened this issue Apr 26, 2024 · 1 comment

Comments

@Kashkovsky
Copy link

The second space is removed when the text containing double spaces is pasted into the editor. 
While it is generally agreed that only one space after a period or punctuation mark is correct, some people may still prefer the double-space format.

Steps for Reproduction

  1. Visit quilljs playground
  2. Paste the following text into the editor:
The first sentence.  The second one.

Expected behavior:
The text is pasted as is (containing 2 spaces after the first period).
Actual behavior:
The second space is removed:

The first sentence. The second one.

Here is the place where the space is removed:

text = text.replace(/\s\s+/g, replacer.bind(replacer, true)); // collapse whitespace

Platforms:

Any platform

Version:

2.0.0

@shareefalis
Copy link

Since it is a module, you can probably extend it to support your need and import that module to your quill instance via quill.register function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants