jzaefferer/undo

Integrate with NY-Times Ice

Closed this issue · 1 comments

I'm trying to integrate this into Ice, what I'm wanting to do is add accept and reject changes to the stack.
I need to be able to make a function for this because I'm not able to bind to a click. I'm getting an error that the variable stack is not found, how can I make it so that I can add to the stack from outside of the $(function() {?

Here's the function that I want to implenent.

function acceptAll() {
        tracker.acceptAll();
        var newValue = $("#textbody").html(); 
        stack.execute(new EditCommand(text, startValue, newValue));
        startValue = newValue;
}

I think you'll have more success getting help on StackOverflow. Either way, without a reduced testpage or at least some link to some code, its almost impossible to debug this.