Backporting the edit mode.