kolkov / angular-editor

A simple native WYSIWYG editor component for Angular 6 -14+
https://angular-editor.kolkov.ru
MIT License
678 stars 360 forks source link

Allow only formatting options like bold, italics, etc. without ability to add or remove content #547

Closed siddharth-gitrepo closed 11 months ago

siddharth-gitrepo commented 11 months ago

Adding or removing text content should be disabled and only formatting options like text color, bold, italics, underline should be allowed. How to go ahead with this implementation ?

siddharth-gitrepo commented 11 months ago

Fixed the issue by handling in beforeinput event in the quill-editor tag: (beforeinput)="onBeforeInput($event)" and stopping propagation using preventDefault();

onBeforeInput($event): void {
    $event.preventDefault();
  }