How to append text in TextArea at cursor location using Javascript
<p>I have a TextArea, textBox and a button. TextArea has some text e.g This is a cat.</p>

<p>Now my requirement is If someone set cursor position in TextArea and enter text in textbox and click on button the text should be append in cursor position instead of last. e.g.</p>

<p>TextArea: This is a cat.
Cursor position: after "a"
Entered Text in TextBox: black</p>

<p>Output: This is a black cat.</p>

<p>How can I do this using javascript.</p>

<p>Thanks in advance.</p>
