Open devnamme opened 1 month ago
Hard to say without actually being able to run any of this code but I think your project might be misconfigured so it's not compiling jsx correctly for your react version. Try updating to the latest versions of react and whatever bundlers/compilers you're using. If you provide a runnable version of the broken code, e.g. on stackblitz or codesandbox, I can take a closer look.
Hi @etrepum, here's a copy of my code. I'm using the following lexical packages:
@lexical/html
@lexical/list
@lexical/react
lexical
As mentioned, the code doesn't work in 0.17.1 but when I downgrade to version 0.5.0, it works. Thanks!
I'm trying to create a custom image plugin by extending
DecoratorNode
. Notably, the same code works with Lexical version0.5.0
(as seen in older online tutorials) but not in the most recent stable version. I'm using React + JavaScript for the project.Lexical version:
0.17.1
Steps To Reproduce
ImageNode
with code belowImagePlugin
with code belowINSERT_IMAGE_COMMAND
Image node code:
Plugin code (no error):
The current behavior
Shows the following error when command is dispatched:
The expected behavior
No error.
Impact of fix
The bug doesn't allow me from extending
DecoratorNode
at all.