mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-13 22:54:42 -04:00
Replace emojibase-data with emoji-picker-element-data (#1293)
* Add Twemoji 13.1 * Use emoji-picker-element instead of emojibase Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
015c618c56
commit
c867673072
5 changed files with 10 additions and 10 deletions
|
@ -4,12 +4,12 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import emojiData from 'emojibase-data/en/compact.json'
|
||||
import emojiData from 'emoji-picker-element-data/en/emojibase/data.json'
|
||||
import { ForkAwesomeIcons } from '../../../editor-page/editor-pane/tool-bar/emoji-picker/icon-names'
|
||||
|
||||
interface EmojiEntry {
|
||||
shortcodes: string[]
|
||||
unicode: string
|
||||
emoji: string
|
||||
}
|
||||
|
||||
type ShortCodeMap = { [key: string]: string }
|
||||
|
@ -17,7 +17,7 @@ type ShortCodeMap = { [key: string]: string }
|
|||
const shortCodeMap = (emojiData as unknown as EmojiEntry[])
|
||||
.reduce((reduceObject, emoji) => {
|
||||
emoji.shortcodes.forEach(shortcode => {
|
||||
reduceObject[shortcode] = emoji.unicode
|
||||
reduceObject[shortcode] = emoji.emoji
|
||||
})
|
||||
return reduceObject
|
||||
}, {} as ShortCodeMap)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue