Jquery/Javascript add emoticon to input

1.3k views Asked by At

I am using Jquery, php and html5. Either an input field or a textarea is used and for both i always run into the same problem: inserting emoticons / smileys: they won't. They only seem to want to add straight up text, nothing else.

I've googled and googled even tried to code something which adds the value of the key pressed to a div (and therefor have the potential to not insert :-) but insert a smiley instead), but that doesn't seem to be ideal.

Do any of you know how to do this properly and would like to show me how?

Really at a loss here....I would be very grateful for any help.

1

There are 1 answers

0
Igor Benikov On

First of all - font letter is graphic object and smile picture is graphic object ))

Most simple way - just using font with smiles instead of regular font. Take a look for http://www.fontspace.com/category/emotions, for example.