Only load codemirror when editor is present