I know hotkeys are available but I want to trigger undo and redo over a button click outside the viewer.
I have also tried trigger event for hotkeys but it doesn’t work.
Please suggest me something to use this default feature for undo and redo of annotations.
To get reference to the history manager you can call docViewer.getAnnotationHistoryManager(), then you should have access to the APIs above. We will update the documenation to make this a bit more clear.