2019-04-14 14:52:12 +00:00
|
|
|
export const parseEmojisMixin = {
|
2019-04-17 10:08:30 +00:00
|
|
|
methods: {
|
|
|
|
parseEmojis(text, emojis) {
|
|
|
|
for (const emoji of emojis) {
|
|
|
|
text = text.split(`:${emoji.shortcode}:`).join(
|
|
|
|
`<img draggable="false" class="icon" alt="${emoji.shortcode}" title="${emoji.shortcode}" src="${emoji.static_url}">`
|
|
|
|
)
|
|
|
|
}
|
|
|
|
return text
|
2019-04-14 14:52:12 +00:00
|
|
|
}
|
2019-04-17 10:08:30 +00:00
|
|
|
}
|
2019-04-14 14:52:12 +00:00
|
|
|
}
|