title: highlight specific text in TextArea
body: <p>I need to simulate a find and replace function in my webpage using javascript, no matter with find and replace, but the problem is how to highlight the matched search results inside the textArea before replacing them.
  I tried to replace matched results with with Bold Tag but it doesn't work because the textArea don't understand HTML tags.</p>
  
  <p>I have used the following code:</p>
  
  <pre><code>function findMyText(searchTxt) {
  
   var textAreaTxt = "";
  
   textAreaTxt = document.getElementById("myTxtAreaID").value;
   var match = new RegExp(searchTxt, "ig");     
   var boldText = '&lt;B&gt;' + searchTxt+ '&lt;\/B&gt;';
   var replaced = textAreaTxt .replace(match, boldText);
  
   document.getElementById("myTxtAreaID").value= replaced;
  }
  </code></pre>
  
  <p>is there any other way to highlight search results in textArea , or how to make textArea understand HTML Tags</p>
  
  <p>Thanks in advance</p>