jodit icon indicating copy to clipboard operation
jodit copied to clipboard

Undo/Redo buttons are disabling after custom button comman click/execution

Open RasheedSiriyala opened this issue 1 year ago • 3 comments

Undo & redo buttons are disabling after custom button click. Issue might be history/observer is getting clear on custom button click.

Jodit Version: jodit-react: 1.3.39

Expected behavior: Expected the undo & redo buttons works after the custom button command execution

Actual behavior: Undo & redo buttons are disaling after the custom button command execution (plugin). So, I couldn't do undo/redo operations.

RasheedSiriyala avatar Nov 29 '23 15:11 RasheedSiriyala

We don't use MutationObserver and you have to tell jodit that you changed something with editor.synchronizeValues()

xdan avatar Dec 06 '23 16:12 xdan

Thank you for the response. Undo button is disabling after the setState() of method in class component. Sharing example of synchronizeValue() for this kind of issues is much appreciated.

RasheedSiriyala avatar Dec 06 '23 22:12 RasheedSiriyala

Added information about sync https://xdsoft.net/jodit/docs/modules/plugin.html#buttons

xdan avatar Jan 02 '24 22:01 xdan