Open marcocarnazzo opened 10 years ago
If you have the same image for many smiley (i. e. ':)' and ':-)'), emoji-menu has duplicate entries.
To avoid this, I changed your code. Here if you want to integrate this feature:
var filenames = []; for (var key in options) { if (options.hasOwnProperty(key)) { var filename = options[key]; var alreadyExists = ($.inArray(filename, filenames) > -1); if (!alreadyExists) { filenames.push(filename); html.push('<a href="javascript:void(0)" title="' + util.htmlEntities(key) + '">' + EmojiArea.createIcon(key) + '<span class="label">' + util.htmlEntities(key) + '</span></a>'); } } }
Uh, just a note. This makes sense only with another piece: I'm trying to implement also live rendering (issue #3 )
If you have the same image for many smiley (i. e. ':)' and ':-)'), emoji-menu has duplicate entries.
To avoid this, I changed your code. Here if you want to integrate this feature: