Replies: 2 comments
-
Hey @FlorentD - good question. Decorators are sort of "black boxes" for Lexical. Inside a DecoratorNode, we just delegate rendering to React (or possibly some other thing) inside that node. To achieve your goal, you'll need to to style the Lexical HeadingNode via theming or, as you mentioned, extend ElementNode and create your own TitleNode (or whatever you want to call it). @zurfyx any other thoughts? |
Beta Was this translation helpful? Give feedback.
0 replies
-
You may need nested editor which you can find how to use from the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello team !
I would like to use a
<Title />
component (from UI lib) to style my headings in Lexical. As I understand I would use aDecoratorNode
withdecorate()
but it seems to be the wrong way as aDecoratorNode
is not "content editable".What is the right way to do this need ? With DraftJS I would use a
customBlockRenderMap
but I cannot figure out with Lexical.Do I have to use an
ElementNode
with styles (same styles than<Title />
comp) ?Thank you for your amazing work !
Beta Was this translation helpful? Give feedback.
All reactions