wobsoriano / lexical-vue

An extensible Vue 3 web text-editor based on Lexical.
https://lexical-vue.vercel.app/
MIT License
251 stars 30 forks source link

editor.update(). #58

Open MyHertOut opened 2 months ago

MyHertOut commented 2 months ago

Error: Unable to find an active editor. This method can only be used synchronously during the callback of editor.update().

CharlexChen commented 2 months ago

occur same problem

zswaff commented 1 month ago

This seems like a very import issue. @nevecex and I are seeing this at Dart too with the latest version of lexical-vue and lexical.

It seems like there may even be a problem with recursion because after a bunch of

Error: Unable to find an active editor state. State helpers or node methods can only be used synchronously during the callback of editor.update() or editorState.read().

We also see

RangeError: Maximum call stack size exceeded

It seems like this has something to do with lexical-vue 0.8.4 in concert with lexical 0.16.x--when we use lexical 0.15.0, for example, we don't have this issue.

That does mean that for the short term you all may be able to solve this the same way we are by using an older version of lexical (we do this by patching node_modules/lexical-vue/package.json with the patch-package tool).

In the longer term this seems like a serious problem so we should look into it!

wobsoriano commented 1 month ago

New version released and it's locked to 0.16.x. Let me know if the issue is fixed!

nevecex commented 1 month ago

This has been fixed in the latest version, thank you!

wobsoriano commented 1 month ago

Thank you @nevecex for the update!