How to access editor.on in react component

12 Views Asked by At

Here is my code

`<CKEditor
      editor={CustomEditor}
      data={defaultValue || ""}
      config={{placeholder, ...DEFAULT_CONFIG.current, ...config}}
      ref={ckeditor}
      disableWatchdog={false}
      onReady={(editor) => {
        ckeditor.current = editor;
      }}

      onChange={(_e, editor: Editor) => {
        const val = editor.data.get();
        onChange(val);
      }}
   />`

how can i integrate or where should i integrate this code in my code ?

editor.on( 'key', function( event ) {
  if ( event.data.keyCode == 13 ) {
    event.cancel();
  }
}

how can i integrate or where should i integrate this code in my code ?

0

There are 0 best solutions below