ngx-quill: linebreaks dublicating

Hello, I noticed something odd when saving and reloading the content in the editor

I’m using ngx-quill 1.6.0 (since my poject is not running on the latest Angular version)

Whenever I save the content of the editor which includes a linebreak, upon reloading, the linebreak has been dublicated. I researched a little and primeNg for example which also uses quill has the same error. On the quill discussions they suggest using a property “matchVisual” which has been added in quill 1.3.0 (link here), which I was not able to find on the ngx-quill editor options in the html.

What I currently have is basicly this:

<quill-editor [(ngModel)]="contentvariable" [style]="{'height':'200px'}">
     <div quill-editor-toolbar>
     <span class="ql-formats">
          <!-- custom set of predefined format options here -->
     </span>
     </div>
</quill-editor>

the contentvariable stays filled with the entered text on reloading the page.

Is there a way to access that matchVisual property or another way to prevent that dublication of linebreaks?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 18 (10 by maintainers)

Most upvoted comments

v4.6.2 released

please, check my readme. https://github.com/KillerCodeMonkey/ngx-quill#config

ngx-quill accepts a modules input, where you can simply pass:

{
    clipboard: {
        matchVisual: false
    }
}