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

Handle consecutive spaces when copying and pasting #4502

Merged
merged 4 commits into from
Nov 29, 2024
Merged

Handle consecutive spaces when copying and pasting #4502

merged 4 commits into from
Nov 29, 2024

Conversation

jhchen
Copy link
Member

@jhchen jhchen commented Nov 26, 2024

No description provided.

@luin luin marked this pull request as ready for review November 29, 2024 06:08
@luin luin merged commit 07b68c9 into main Nov 29, 2024
6 of 7 checks passed
@luin luin changed the title Jc whitespace Handle consecutive spaces when copying and pasting Nov 29, 2024
@luin luin deleted the jc-whitespace branch November 29, 2024 06:09
@@ -370,7 +370,8 @@ function convertHTML(
return blot.html(index, length);
}
if (blot instanceof TextBlot) {
return escapeText(blot.value().slice(index, index + length));
const escapedText = escapeText(blot.value().slice(index, index + length));
return escapedText.replaceAll(' ', ' ');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, why was it necessary? I got an error after update because of this. The text I get from a quill instance using event.editor.getSemanticHTML() now returns   instead of all spaces resulting in wrong behavior when I pass this string to another service, which renders it in PDF.

Copy link

@jonmarozick jonmarozick Dec 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are seeing the   on copy/pasting into the editor. We're using PrimeNG 17.18.12 with quill 2.0.3. We reverted to quill 2.0.2 because of this issue

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

Successfully merging this pull request may close these issues.

4 participants