I want to remove focus from editor based on some other events that happen outside the editor.
I tried this
cm.dispatch({ selection: { anchor: 0, head: 0 } })
But this didn’t work. Any simple way to achieve this? Thank you.
I want to remove focus from editor based on some other events that happen outside the editor.
I tried this
cm.dispatch({ selection: { anchor: 0, head: 0 } })
But this didn’t work. Any simple way to achieve this? Thank you.
cm.contentDOM.blur()
should work.
Thank you marjin. That worked.