Add edit functionality to ti