After ckeditor gains focus, a class of cke_focus is added to prevent the keydown event of the enter key from taking effect.

  1. after ckeditor gains focus, the class of cke_focus is added to prevent the keydown event of the enter key from taking effect

here is the code for the keyboard event

$(document).on("keydown","-sharpcomponent_4_0",function(e){
    e.stopPropagation ? e.stopPropagation() : e.cancelBubble=true;
    e.preventDefault ? e.preventDefault() : e.returnValue = false ;
    window.getSelection().removeAllRanges()
    return false;
})

if you write in this way, all the other buttons are valid, but the enter key does not take effect after adding cke_focus class
pressing enter will delete the original picture

Feb.27,2021
Menu