In HTML I have more than one text areas with text and when the user clicks on the text area the global variable will be updated with cursor ID.After that If the user click on any one of the link depending upon the link I get the text from database using Jquery ajax and place that text depending upon the global variable.
What I need in this is user may click anywhere in text area and if they click link after that I need to be place the text there without overwritting that existing text.
For example in Text area have the text like Hai How you and if they click between
How and you and the if ajax result is are then expected result is Hai How are you.
How can I implement this in Jquery?