How to programmatically remove focus from the editor?

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.

1 Like

Thank you marjin. That worked.