Getting CodeMirror to follow a TextArea
问题 How can I get CodeMirror to sync with a TextArea, so that the cursor position, selection & data stay the same on the both of them? I'm using CodeMirror with MobWrite. CodeMirror only uses a textArea to read input & MobWrite can handle the selection, etc over a given TextArea, the problem is to get CodeMirror to sync with a TextArea. 回答1: Extended the ModWrite code to support CodeMirror & it works like a charm. It can also be found on GitHub. Details on the CodeMirror Group. Code dumped below