Hi Jaehyun,
Greetings from Syncfusion support.
We have validated your query, currently we doesn’t have keyboard event in our RichTextEditor component. We can achieve it from application end by binding keyboard event (keyup) into edit element of the editor.
Follow below steps to configure keyboard event
- Bind created event in RichTextEditor component
<RichTextEditorComponent ref={(richtexteditor) => { this.rteObj = richtexteditor; }} created={this.onCreate.bind(this)}>
</RichTextEditorComponent>
|
- Define onCreate handler function and bind keyboard event to edit element of the editor
// created event handler
onCreate() {
var editarea = document.querySelector('.e-richtexteditor .e-rte-content .e-content');
editarea.addEventListener('keyup', this.docKeyUp); //Bind keyup event
}
// KeyUp event handler
docKeyUp(e) {
if (e.keyCode === 13) {
alert("Enter keypressed");
}
}
|
We have prepared sample for your reference, check the below link
Regards,
Pandiyaraj