Attach to keyboard events

Hi, 

We are triying to attach to the keyboard events in the document editor but the event is never fired


 <ejs-documenteditorcontainer
                                id="container"
                                ref="doceditcontainer"
                                class="height-100-important"
                                :enableLocalPaste="false"
                                :enableWordExport="true"
                                :enableToolbar="true"
                                @hook:mounted="onEditorLoaded"
                                data-cy="documentEditor"
  >

We are attaching to the event in the onEditorLoaded method

In the template we are using ejs-documentEditorContainer, but in the documentation you use the ejs-documentEditor, so,we get the reference of the documentEditor from the documentEditorContainer, but it doesn't work. 

What can be wrong?

onEditorLoaded(): void {
                 
           this.docEditorContainer?.ej2Instances.documentEditor.addEventListener("keydown", (event: any) => {
            console.log("KeyDownDetected",event)
            })
    }


Thank you in advance for your response,

Regards

Gaspar



4 Replies

AE Ajithamarlin Edward Syncfusion Team June 27, 2022 05:51 AM UTC

HI Gaspar,


We will check and update further details by June 27,2022.


Regards,

Ajithamarlin E



AE Ajithamarlin Edward Syncfusion Team July 12, 2022 05:32 AM UTC

Hi Gaspar,


Please refer the below documentation to know about how to override keyboard events.


https://ej2.syncfusion.com/vue/documentation/document-editor/how-to/override-the-keyboard-shortcuts/


Please let us know if you need any further assistance.


Regards,

Ajithamarlin E




GB Gaspar Blein July 12, 2022 06:43 AM UTC

Hi  Ajithamarlin, 


Thank you for your answer I'll do it. 


Regards


Gaspar



AE Ajithamarlin Edward Syncfusion Team July 13, 2022 04:42 AM UTC

Hi Gaspar,


Thanks for the update.


Regards,

Ajithamarlin E


Loader.
Up arrow icon