Add title text for emoji in messages.

Fixes #250

// FREEBIE
This commit is contained in:
Sam Lanning 2016-02-15 21:53:37 +00:00 committed by lilia
parent 7b1c06538d
commit 662020ce68
3 changed files with 46 additions and 1 deletions

View file

@ -87,7 +87,19 @@
this.renderControl();
twemoji.parse(this.el, { base: '/images/twemoji/', size: 16 });
twemoji.parse(this.el, {
attributes: function(icon, variant) {
var colon = emoji_util.get_colon_from_unicode(icon);
console.log("colon: ", colon);
if (colon) {
return {title: ":" + colon + ":"};
} else {
return {};
}
},
base: '/images/twemoji/',
size: 16
});
var content = this.$('.content');
var escaped = content.html();