Skip to content
Snippets Groups Projects
Commit e57e6f50 authored by unarist's avatar unarist Committed by Eugen Rochko
Browse files

Show emoji shortname by a tooltip (#2784)

parent bea117a4
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@ const unicodeToImage = str => {
const filename = emojione.emojioneList[short].fname;
const alt = emojione.convert(unicode.toUpperCase());
return `<img draggable="false" class="emojione" alt="${alt}" src="/emoji/${filename}.svg" />`;
return `<img draggable="false" class="emojione" alt="${alt}" title="${short}" src="/emoji/${filename}.svg" />`;
});
};
......@@ -27,7 +27,7 @@ const shortnameToImage = str => str.replace(emojione.regShortNames, shortname =>
const unicode = emojione.emojioneList[shortname].unicode[emojione.emojioneList[shortname].unicode.length - 1];
const alt = emojione.convert(unicode.toUpperCase());
return `<img draggable="false" class="emojione" alt="${alt}" src="/emoji/${unicode}.svg" />`;
return `<img draggable="false" class="emojione" alt="${alt}" title="${shortname}" src="/emoji/${unicode}.svg" />`;
});
export default function emojify(text) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment