You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to create a custom image plugin by extending DecoratorNode. Notably, the same code works with Lexical version 0.5.0 (as seen in older online tutorials) but not in the most recent stable version. I'm using React + JavaScript for the project.
Shows the following error when command is dispatched:
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Check the render method of `RichTextPlugin`.
at createFiberFromTypeAndProps (chunk-3IHV7RO6.js?v=82682a78:20442:23)
at createFiberFromElement (chunk-3IHV7RO6.js?v=82682a78:20463:23)
at reconcileSingleElement (chunk-3IHV7RO6.js?v=82682a78:10513:31)
at reconcileChildFibers2 (chunk-3IHV7RO6.js?v=82682a78:10550:43)
at updatePortalComponent (chunk-3IHV7RO6.js?v=82682a78:15626:37)
at beginWork (chunk-3IHV7RO6.js?v=82682a78:15941:22)
at beginWork$1 (chunk-3IHV7RO6.js?v=82682a78:19753:22)
at performUnitOfWork (chunk-3IHV7RO6.js?v=82682a78:19198:20)
at workLoopSync (chunk-3IHV7RO6.js?v=82682a78:19137:13)
at renderRootSync (chunk-3IHV7RO6.js?v=82682a78:19116:15)
The expected behavior
No error.
Impact of fix
The bug doesn't allow me from extending DecoratorNode at all.
The text was updated successfully, but these errors were encountered:
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.
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.The text was updated successfully, but these errors were encountered: