I am using ace editor in my project. I added two events.
1. ctrl+4 - on this event user can update selected text. It is working file.
2. ctrl+z - on this event I am calling a method. code is given below.
public handleUndo(modal) {
let markersList = this.templateeditor.getEditor().session.getMarkers();
this.templateeditor.getEditor().session.getUndoManager().undo();
this.templateeditor.getEditor().getSelection().clearSelection();
this.templateeditor.getEditor().session.addMarker(range, 'undoMarker', 'text', true)
}
whenever user is changing value using ctrl+4, I am adding a marker which highlights selected text.
whenever user press ctrl+z value is reverting back properly but highlighting is not removing.
Can someone please tell me how can I do that.
Can I replace current marker ?
Thanks in Advance