I know that for now, it's more a POC than the real thing, but I have couple of comments:
  1. Try to find an other name than `startStopEdit()` it's an odd name for what you are trying to achieve
  2. You should never rely on the color of a component to implement logic, at least use a boolean or something else that is not UI coupling.
  3. I'm really not sure what you were trying to attempt by changing so much states, do you really need to switch everything there?