0

I need to set the max length of Angular Editor. I have tried so many ways but was not able to set the maxlength.

 <angular-editor
    [(ngModel)]="htmlContent"
    [config]="config"
    maxlength="10"></angular-editor>

I have tried the below editors.

  • kolkov/angular-editor
  • ngx-quill
  • p-editor

Please help me to solve the maxlength validations.

Or

Suggest me the other editor with minlength and maxlength validation options.

Example: https://stackblitz.com/edit/angular-editor-wysiwyg-afbpk1?file=src/app/app.component.html

Murugan
  • 95
  • 2
  • 12
  • It does not look like from the documentation that maxlength and minlength validations are supported out of the box with Angular-Editor...You could roll your own code on keyup event to track the length of text entered by user... validate that – Siddharth Seth Dec 01 '21 at 05:32
  • In general frontend length validation is reflect the backend validator. So one option is to remove HTML tags and set a manual validator flash show/false. – Carnaru Valentin Dec 01 '21 at 05:33

0 Answers0