events keydown and paste for EJ2 richtexteditor

Is it possible to use the events keydown and paste for EJ2 richtexteditor?
Or is there another way to achieve these events for the richtexteditor?

Now I'm using a contenteditbale div with these events which prevent editing special mergefields:
<div contenteditable="true" applyformat="true" name="txt" #txt (keydown)="keydown($event)" (paste)="paste($event)"></div>

I tried to implement these events also in the richtexteditor, but it doesn't trigger the events:
<ejs-richtexteditor [(ngModel)]="txtValue" name="txt" #txt (keydown)="keydown($event)" (paste)="paste($event)"></ejs-richtexteditor>


1 Reply

PO Prince Oliver Syncfusion Team October 4, 2018 10:38 AM UTC

Hi Sietse, 

Thank you for contacting Syncfusion support. 

Yes, it is possible to use the events keydown and paste with EJ2 RichTextEditor. We have prepare a sample using the shared code snippet for your reference. 

Please find the sample at the following location: https://stackblitz.com/edit/rte-sample-sqzzu9 

Please let us know if you require any further assistance on this. 

Regards, 
Prince 


Loader.
Up arrow icon