update the codemirror editor