make new emoji module in vuex, add funcionality for grouping emojis

This commit is contained in:
Milos Holba
2021-02-02 16:10:16 +01:00
parent ba5e05f77a
commit e65acd8a4f
8 changed files with 14231 additions and 36935 deletions

View File

@@ -353,25 +353,10 @@ const Helpers = {
body.classList.add('windows')
}
},
Vue.prototype.$transferListTwemoji = function (elementId) {
// Transfer whole DOOM or set element to twemoji
this.$nextTick(() => {
let list = elementId ? document.getElementById(elementId) : document.body
twemoji.parse(list, {
folder: 'svg',
ext: '.svg',
attributes: () => ({
loading: 'lazy',
})
})
})
},
Vue.prototype.$transferSingleTwemoji = function (emoji, jsonParse) {
// Transfer single emoji to twemoji
return twemoji.parse( !jsonParse ? emoji : JSON.parse(emoji).char , {
return twemoji.parse( !jsonParse ? emoji.char : JSON.parse(emoji).char , {
folder: 'svg',
ext: '.svg',
attributes: () => ({