From 939c1bfbb8565656f344287315342da1ddf6cbaa Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sat, 23 Sep 2023 17:27:39 -0500 Subject: [PATCH] lexical: fix custom emojis (add a text representation of them) --- src/features/compose/editor/nodes/emoji-node.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/features/compose/editor/nodes/emoji-node.tsx b/src/features/compose/editor/nodes/emoji-node.tsx index b3a7116cf7..523b225c1f 100644 --- a/src/features/compose/editor/nodes/emoji-node.tsx +++ b/src/features/compose/editor/nodes/emoji-node.tsx @@ -61,8 +61,7 @@ class EmojiNode extends DecoratorNode { } static importJSON(serializedNode: SerializedEmojiNode): EmojiNode { - const { name, src } = - serializedNode; + const { name, src } = serializedNode; const node = $createEmojiNode(name, src); return node; } @@ -84,6 +83,10 @@ class EmojiNode extends DecoratorNode { return true; } + getTextContent(): string { + return this.__name; + } + decorate(): JSX.Element { return (