Say I want to move to the next proseMirror view after pressing Enter
;
I tried creating a plugin that simulates the Tab event but to no avail:
handleKeyDown(view, event) {
console.log('go', view, event)
if (event.key === 'Enter') {
document.activeElement?.blur()
let event = document.createEvent('Event')
event.initEvent('keydown', true, true)
event.keyCode = 16
view.dispatchEvent(event)
return true
}
}
I’m aware JS doesn’t really allow one to simulate a native keypress; just wondering if Prosemirror has a simple way to move to the next proseMirror view (acheiving the same thing as pressing tab)