previous codemirror configuration backported