I am implementing "find and correct" functionality using codemirror. I know there is an addon for search and replace, but it doesn't fulfill my requirement. the editor is for writing particular queries. It creates spans in
<pre>
<span class="cm-field">field</span>:jet <span class="cm-other-operator active" >adj3</span> engine <span class="cm-operator">OR</span> jet <span class="cm-other-operator" >near5</span> engine
</pre>
please refer snapshot. If i click on any of the operator (orange colored), the cursor starts blinking there and the functionality is working. On clicking find next button i am able to find the respective span but unble to set cursor there. So How can i set Cursor position there. Thanks in advance.
editor.dispatch({selection: {anchor: N, head: N}})
discuss.codemirror.net/t/set-cursor-position-in-v6/4476 – Eagre