The script below inserts text to the end of text area. I need to change to insert text after current cursor position in the text area.
jQuery(document).read
You may checkout this answer. The insertAtCaret jquery plugin seems very nice.
insertAtCaret