Yoopta-Editor
Yoopta-Editor copied to clipboard
[BUG] Fix solution for document change detection in YooptaEditor
Has this bug been raised before?
- [X] I have checked "open" AND "closed" issues and this is not a duplicate
Description
You have to compare objects to understand that something has changed. Plus, when adding a new block at the end of the document (when the mouse is clicked), the presence of changes is triggered, since a new block appears (and before we started entering text). const onEditorChange = (payload: any) => { if (originalEditorValue !== undefined) { setIsChanged(!_.isEqual(originalEditorValue, payload)) } }
Steps to Reproduce
If you know the steps, follow the below format and provide steps to reproduce
For example:
- Go to
page. - On top right side, close to the <Account> menu
- Some menu are not working properly.
- Continue...
If you don't know exact steps, include any relevant details like:
- What page you were on...
- What you were trying to do...
- What went wrong...
Environment
- OS:
- Browser:
Screenshots
No response
Do you want to work on this issue?
No
If "yes" to above, please explain how you would technically implement this
No response