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

Incorrect replace functionality if replcement text contains line break (\n) #4374

Open
AAbakumov opened this issue Aug 14, 2024 · 0 comments

Comments

@AAbakumov
Copy link

AAbakumov commented Aug 14, 2024

Replace functionality with all content selected using document.execCommand('insertText', false, 'Hello.\nTest.') works incorrectly. This type of insertion is used by third-party developers to programmatically insert text into the editor.

Steps for Reproduction

  1. Visit quilljs.com
  2. Press Ctrl/Cmd+A to select all the editor content
  3. Open developer tool
  4. Use the next command: document.execCommand('insertText', false, 'Hello.\nTest.')

Expected behavior: is to see Hello. Test.

Actual behavior: the inserted text is cut ('Hello.')

Platforms: All

Version: 2.0.2

Screenshot 2024-08-14 at 13 13 32
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

1 participant