title: Change caret position in textarea by click on button
body: <p>I have a textarea with this content :</p>
  
  <pre><code>[supreme] a test text or anything [/supreme]
  </code></pre>
  
  <p>I have a button too. <strong>I want to when button clicked , textarea selected and change caret position to this :</strong></p>
  
  <pre><code>[supreme] a test text or anything  &lt;caret postion&gt; [/supreme]
  </code></pre>
  
  <p>How can i do this with javascript or jquery ?</p>
  
  <p>Thanks .</p>