Simulate edit code