Initialize CodeMirror from an InitHook