added ctrl-s handler to codemirror editor