From dd27cd6b5e30c3da2ec43c85d7d7290c26fe59c3 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 fd0af1e..1d60833 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 2924961..95922e2 100644 --- a/src/app/plugins/react-custom-html-parser.tsx +++ b/src/app/plugins/react-custom-html-parser.tsx @@ -46,6 +46,7 @@ const textToEmojifyJSX = (text: string): (string | JSX.Element)[] => return { isUsingTwemoji() ? {char} :