joypixels / emojify.js

A Javascript module to convert Emoji keywords to images
http://hassankhan.github.io/emojify.js/
MIT License
1.8k stars 238 forks source link

What html tag should go for sprite #179

Open edindino opened 7 years ago

edindino commented 7 years ago

I added sprite ../images/emoji.png but I don't know how to call it in emojify.js

function defaultReplacer(emoji, name) { /*jshint validthis: true */ var elementType = this.config.tag_type || modeToElementTagType[this.config.mode]; if (elementType !== 'img') { return "<" + elementType + " class='emoji emoji-" + name + "' title=':" + name + ":'></" + elementType + ">"; } else { return "<img align='absmiddle' alt=':" + name + ":' class='emoji' src='" + this.config.img_dir + '/' + name + ".png' title=':" + name + ":' />"; } }

edindino commented 7 years ago

@hassankhan @island205 @juanpastas