Text chat with emoticons . How?

What is the best way to make a chat and combine text and custom emoticons ( images) ? If htmltext supports img tag this maybe a good solution.

You can mix fonts using a font that embeds icons like Font Awesome and even make your own with https://icomoon.io
Not sure if img tag is supported and good enough for this.

Thank you for for the reply !
Most of the icons, which I want to use, will be colorful and made only for that chat .
I think Font Awesome and IconMoon offer one color icons .
I’m not sure if it’s possible to make full color icons as a font .
For that reason the first idea was to use htmltext .
The other solution will be to place icons on the text ( as separate sprites) and calculate the position on every emoticon ( including when the user scroll the text)