Open bloodteller123 opened 1 month ago
I think this is a bug in Lexical. This looks the same: https://github.com/facebook/lexical/issues/3535 - and it looks like the PR never got merged. Your markdown is fine, by the way. Even if I reduce it down to:
let md2 = `**To:**`;
the error still happens. My gut feel says something does not work with bold formatting being the beginning of the paragraph.
I will see what I can do, but in the meantime, you can also try to reproduce the problem in a plain Lexical environment and get something going there.
If you want to ask for support or request features, sponsor the project and contact me over email.
Describe the bug I have a markdown string which is built by GPT (returned from some API calls), it's passed to the Editor via markdown props as the initial markdown. If I perform undo operation when the editor is open, I can see it's popping error.
Reproduction https://codesandbox.io/p/sandbox/test-lv7m8w?file=%2Fsrc%2FApp.tsx please see the
md2
string; and please kindly ignore and close thereference error
page :)To Reproduce Steps to reproduce the behavior:
Expected behavior no error
Desktop (please complete the following information):
Additional context The markdown string is constructed by GPT, and I wondered if it's because of some special characters that cause the error? because I tried it with the markdown from your example, and normal text, everything works fine...
Besides, is there a way to suppress the error page? I know in Lexical we can config the onError method in initialConfig of LexicalComposer which doesn't pop the error page when the error occurs by
console.log()
. Thank you very much.