How to listen to focus event in CKEditor 5
问题 I'd like to listen to the focus event in CKEditor 5. I thought something like this would work but the callback is never called: document.querySelector("#editable"); ClassicEditor.create(el).then(editor => { editor.on('focus', () => { console.log("Focused"); }); }); The editor is successfully created but the callback is not called. Any ideas? 回答1: The editor comes with a FocusTracker (and the observable #isFocused property) for that purpose: editor.ui.focusTracker.on( 'change:isFocused', ( evt