Bob Ippolito
Bob Ippolito
Pretty sure that this was fixed in #6834
Lexical's behavior is correct, Word isn't putting semantic HTML on the clipboard and Lexical is just importing what it sees. You'll get the same behavior if you paste this HTML...
The solution to addressing any HTML import issue is addressed by my previous comment, you need to override importDOM or the html config accordingly.
That's exactly why you have to override the default implementation, the one that's designed for semantic markup.
Why don’t you include a reference to the editor in your callback and ignore it if it doesn’t match the editor in your array? Using React’s key property correctly might...
You can also have a ref that tracks if the editor is unmounted and return from that debounced function body when that has happened.
Certainly passing the key through to your callback so you can verify that the update came from the editor you expected to should work. That said, if you can provide...
I still haven't seen a complete example that reproduces this issue. If you post a complete runnable example that reproduces the issue, it will be investigated.
I haven't seen any evidence that any extra updates happen on *unmount* but there are certainly ways that you can get an extra update when a new editor is *mounted*,...
Sometimes these things happen because the previous behavior was incorrect.