mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-02 20:59:56 +01:00
feat: add title property to custom emoji markup
This commit is contained in:
@@ -52,7 +52,7 @@ module.exports = function (Posts) {
|
|||||||
isEmojiShortcode.test(tag.name) &&
|
isEmojiShortcode.test(tag.name) &&
|
||||||
tag.icon && tag.icon.mediaType && tag.icon.mediaType.startsWith('image/'))
|
tag.icon && tag.icon.mediaType && tag.icon.mediaType.startsWith('image/'))
|
||||||
.forEach((tag) => {
|
.forEach((tag) => {
|
||||||
postData.content = postData.content.replace(new RegExp(tag.name, 'g'), `<img class="not-responsive emoji" src="${tag.icon.url}" />`);
|
postData.content = postData.content.replace(new RegExp(tag.name, 'g'), `<img class="not-responsive emoji" src="${tag.icon.url}" title="${tag.name}" />`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user