proper codemirror integration with formatting enabled