Closed BunnyGeorgianIvan closed 1 year ago
@BunnyGeorgianIvan This is because I cannot compare whether the extensions have changed, and I am still at a loss.
@BunnyGeorgianIvan If I use dispatch
to update extension
it will throw an error. So I used a special method to solve this problem, but it caused a new problem, that is, the editor will be re-rendered.
I think this problem may need to be solved officially by @codemirror/merge
@jaywcjlove Got it. Thank you for the quick response and the clarification! 🙇
There seems to be a bug in the example. Whenever a change/render occurs, the editor loses focus and is reset/reinitialized. with the original value.
https://uiwjs.github.io/react-codemirror/#/merge/onchange https://codesandbox.io/s/wonderful-kate-xr2sd9?file=/src/App.js:303-316