-
|
I am trying to use the Node Replacement api to extend ParagraphNode and replace it with my own. The way the drag-handle & "+" button are rendered in the playground does not work for me. I need those visible & accessible at all times for each ParagraphNode. Extending from DecoratorNode might not work well, because i will have to handle the text myself and wont be able to do text transforms. I am trying to migrate a codebase from platejs to lexical and in platejs such a thing is easy: https://platejs.org/docs/components/comment-toolbar-button Is this possible in lexical? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
|
It should be possible with the internal and undocumented getDOMSlot API, but there is no guarantee that API will be stable. Otherwise there has to be a 1:1 correspondence between DOM children and lexical children |
Beta Was this translation helpful? Give feedback.
Yes, you could write your own plugin that absolutely positions some elements relative to other elements using a mutation listener