Workaround for broken CodeMirror editors on first load.
Fix CodeMirror editors when switching between updating an existing shape and adding a new shape.