I'm trying to save change actions in an Ace editor and then play them back. There's some pseudo-ish code below - the gist is that the applyDeltas API doesn't seem to do anything for my editor. I bind to the editor change event, push change deltas to an array, and try to play it back later - I don't see any errors when I run the code below, but I also don't see my editor content change.
Thanks
Mustafa
shouldRecord = true;
myStoredArray = new Array();
editor.on('change', function(e) {
if(shouldRecord) {
myStoredArray.push(e.data);
}
});
//on a button click
shouldRecord = false;
editor.getSession().setValue(''); //clear
for(var currentDelta in myStoredArray) {
editor.getSession().getDocument().applyDeltas(currentDelta);
}