From 0684ba645e81f796b2c67e0b5697bca89411e35a Mon Sep 17 00:00:00 2001 From: sup39 Date: Thu, 18 Jan 2024 20:47:03 +0900 Subject: [PATCH] chore: set alt of Twemoji for copying --- src/app/components/editor/Elements.tsx | 3 ++- src/app/components/emoji-board/EmojiBoard.tsx | 3 ++- src/app/plugins/react-custom-html-parser.tsx | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/app/components/editor/Elements.tsx b/src/app/components/editor/Elements.tsx index 3f4fd49..02fb545 100644 --- a/src/app/components/editor/Elements.tsx +++ b/src/app/components/editor/Elements.tsx @@ -98,7 +98,8 @@ function RenderEmoticonElement({ isUsingTwemoji() ? {element.shortcode} : element.key )} {children} diff --git a/src/app/components/emoji-board/EmojiBoard.tsx b/src/app/components/emoji-board/EmojiBoard.tsx index 2df0fbe..344ba47 100644 --- a/src/app/components/emoji-board/EmojiBoard.tsx +++ b/src/app/components/emoji-board/EmojiBoard.tsx @@ -283,7 +283,8 @@ const NativeEmoji = (emoji: IEmoji) => loading="lazy" className={css.EmoticonImg} src={getEmojiUrl(emoji.unicode)} - alt={emoji.shortcode} + alt={emoji.unicode} + title={emoji.shortcode} /> : emoji.unicode; export function EmojiItem({ diff --git a/src/app/plugins/react-custom-html-parser.tsx b/src/app/plugins/react-custom-html-parser.tsx index c473196..a12a42d 100644 --- a/src/app/plugins/react-custom-html-parser.tsx +++ b/src/app/plugins/react-custom-html-parser.tsx @@ -46,6 +46,7 @@ export const scaleSystemEmoji = (text: string): (string | JSX.Element)[] => return { isUsingTwemoji() ? {char} :