Update the visual diff support in the editor template (and controller)

Fixes #807.