Unify the two codemirror templates