Use Twemoji
This commit is contained in:
parent
4e7fbd8967
commit
0963e6d6e1
6 changed files with 98 additions and 25 deletions
|
|
@ -188,24 +188,10 @@ export default Vue.component('misskey-flavored-markdown', {
|
|||
}
|
||||
|
||||
case 'emoji': {
|
||||
//#region カスタム絵文字
|
||||
if (this.customEmojis != null) {
|
||||
const customEmoji = this.customEmojis.find(e => e.name == token.emoji || (e.aliases || []).includes(token.emoji));
|
||||
if (customEmoji) {
|
||||
return [createElement('img', {
|
||||
attrs: {
|
||||
src: customEmoji.url,
|
||||
alt: token.emoji,
|
||||
title: token.emoji,
|
||||
style: 'height: 2.5em; vertical-align: middle;'
|
||||
}
|
||||
})];
|
||||
}
|
||||
}
|
||||
//#endregion
|
||||
|
||||
const emoji = emojilib.lib[token.emoji];
|
||||
return [createElement('span', emoji ? emoji.char : token.content)];
|
||||
const { emoji } = token;
|
||||
return [createElement('mk-emoji', {
|
||||
attrs: { emoji }
|
||||
})];
|
||||
}
|
||||
|
||||
case 'search': {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue