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

excess new lines #4155

Open
windmillcode0 opened this issue May 1, 2024 · 0 comments
Open

excess new lines #4155

windmillcode0 opened this issue May 1, 2024 · 0 comments

Comments

@windmillcode0
Copy link

Please describe the a concise description and fill out the details below. It will help others efficiently understand your request and get to an answer instead of repeated back and forth. Providing a minimal, complete and verifiable example will further increase your chances that someone can help.

  • Steps to reproduce
    1paste this value into quill emoji editor
    😽☝👃👰👸👚👛👏👏☝
    😽☝👃👰👸👚👛👏👏☝

😽☝👃👰👸👚👛👏👏☝

2, create a quill element and listen for text change

    this.quill = new Quill("yourElement", {
      theme: 'snow',
      modules:{
        toolbar:true,

      },
    });
    this.quill.on('text-change',this.listenForTextChange)
 listenForTextChange = (delta, oldDelta, source)=>{
    let text = this.quill.root.innerText
console.log(text)
//solution
    //text = text.replace(/\n\n/g, '\n');
}

Expected behavior:
Excess new lines should not be added

Actual behavior:
https://www.youtube.com/watch?v=MemPRSWztfY

Platforms:

Include browser, operating system and respective versions
Google Chrome 124.0.6367.91 (Official Build) (64-bit) (cohort: M124 Rollout)
Review 51df0e5e17a8b0a4f281c1665dbd1b8a0c6b46af-refs/branch-heads/6367@{#984}
Windows 11 Version 23H2 (Build 22631.3447) operating system
JavaScript V8 12.4.254.14
User-agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
Command line "C:\Program Files\Google\Chrome\Application\chrome.exe" --profile-directory="Profile 2" --restart --flag-switches-begin --flag-switches-end
Executable path C:\Program Files\Google\Chrome\Application\chrome.exe
Profile Path C:...\User Data\Profile 2
Version:

Run Quill.version to find out
2.0.0

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