const editor = new Quill(selector, {
theme: 'snow',
modules: {
keyboard: {
bindings,
}
IM use quilljs js keyboard module https://quilljs.com/docs/modules/keyboard/ tried two variants
bindings.handleEnter = {
key: 13,
handler: () => { console.log(45656); },
};
bindings['enter'] = {
key: 13,
handler: () => { console.log(45656); },
};
But not work enter code. Other key code works
It turned out that he does not see the code, but he sees the name of the button with a capital letter. It works
bindings['enter'] = {
key: 'Enter',
handler: () => { console.log(45656); },
};