Upgrade emoji support and switch to apple emoji
Use emojijs for replacing unicode with image tags for display. We were already using it to replace colons with unicode. Additionally it has a companion data repo that is kept up to date with images from all the common image sets. // FREEBIE
This commit is contained in:
parent
262f9d135f
commit
f042378a37
4251 changed files with 4471 additions and 3283 deletions
|
@ -125,20 +125,10 @@
|
|||
|
||||
this.renderControl();
|
||||
|
||||
twemoji.parse(this.el, {
|
||||
attributes: function(icon, variant) {
|
||||
var colon = emoji_util.get_colon_from_unicode(icon);
|
||||
if (colon) {
|
||||
return {title: ":" + colon + ":"};
|
||||
} else {
|
||||
return {};
|
||||
}
|
||||
},
|
||||
base: '/images/twemoji/',
|
||||
size: 16
|
||||
});
|
||||
|
||||
var body = this.$('.body');
|
||||
|
||||
emoji_util.parse(body);
|
||||
|
||||
if (body.length > 0) {
|
||||
var escaped = body.html();
|
||||
body.html(escaped.replace(/\n/g, '<br>').replace(URL_REGEX, "$1<a href='$2' target='_blank'>$2</a>"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue