Open hata6502 opened 4 years ago
If I am getting this right, listening for a focus
event on a contentEditable
block should help out.
Related issue #1198
It would be good to have onFocus
& onBlur
events for the whole Editor.
I got a super basic editor, so can't tell if it works for deeper/all blocks.
The editor is rendered inside a custom holder, this custom holder is focusable and catches the listeners inside, but isn't focusable by it's own through e.g. the keyboard.
Using React, this is the custom holder:
<div
id={'_uis2-editor'}
tabIndex={-1}
onFocus={onFocus}
onBlur={onBlur}
/>
Standar blok fokus
I think it is more useful to implement focus event in Editor.js ! To catch Block's onFocus event, it needs to use MutationObserver currently.
console output