I want to insert the emoticon code in the text area under the cursor position by clicking on the images.
There are three images in the #smiles div:
And the array
var smiles = {
"happy": ":)",
'sad': ':(',
'normal': ': |'
};
Textarea - #text
I do not know if it is normal to use image images to communicate with the code, or is there a better way (for example, by position).
Can you help me write the code. I will learn this :)
source
share