Got synchronization working with CodeMirror as the text editor