Styling EmojiNode for inline svg? #6096
Unanswered
addlistener
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to make a EmojiNode
color: red
. The reason I want to do it is I have some<svg stroke=currentColor />
to render in my custom EmojiNode.Right now you cannot set style attribute on EmojiNode. Open playground.lexical.dev. And select a range that contains the smile emoji and set it red. You will see the color is not applied to the node but applied to segments before and after the EmojiNode
The
canHaveFormat
returns true for EmojiNode since it does not overrideTextNode.canHaveFormat
. But I guess there are some other logic I didn't spot.Is there a way we can achieve this?
Beta Was this translation helpful? Give feedback.
All reactions