title: How to use the function search and replace in codemirror editor?
body: <p>I am using codemirror and I need to use the function search and replace ... I read this <a href="https://codemirror.net/doc/manual.html#addons" rel="nofollow">here this function </a> </p>
  
  <p>I want to find word and replace it by another word ... I write this code but did not work :</p>
  
  <pre><code>  &lt;script src="plugin/codemirror/addon/search/search.js"&gt;&lt;/script&gt;
    &lt;script src="plugin/codemirror/addon/search/searchcursor.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>here use the function :</p>
  
  <pre><code>   var cor= editor.getSearchCursor("one", null, null);
      cor.replace("one","anything");
  </code></pre>
  
  <p>so what wrong ? How I can call the function correct ?</p>