Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Ben Marte 13 posts 34 karma points
    Jul 08, 2014 @ 15:58
    Ben Marte

    How to change Codemirror theme

    New Umbraco 7 user here and I'm trying to figure out how to change codemirrors default theme.

    I went ahead and edited the theme setting in: UmbracoClient > CodeMirror > JS > Lib > codemirror.js 

    Restarted the site but any editor fields are still displaying the default theme, do I have to change it somewhere else? Is this possible in Umbraco?

    Thanks for your help and my apologies if this is the wrong section to post this.

  • Dan Lister 416 posts 1973 karma points c-trib
    Jul 08, 2014 @ 17:05
    Dan Lister

    Have you cleared or disabled your browser cache? If not, give that a whirl.

  • Sebastiaan Janssen 4942 posts 14782 karma points MVP admin hq
    Jul 09, 2014 @ 09:17
    Sebastiaan Janssen

    Note that whenever you upgrade umbraco, you'd have to make this customization again. We don't officially support changing the theme. Also make sure to change the version in ClientDependency.config so that client cache gets cleared (as well as clearing your browser cache).

  • Ben Marte 13 posts 34 karma points
    Jul 09, 2014 @ 16:03
    Ben Marte

    First of all thanks for taking the time to respond.

    I cleared my cache and it still displays the default theme.

    I looked into the ClientDependency.config file in the Config folder but I can't find anything that pertains to Codemirror or the theme it uses.

    This is what my ClientDependency.config looks like.

    <?xml version="1.0" encoding="utf-8"?>
    <!-- For full details of the client dependency framework, visit It manages CSS and JS file dependencies per control without having to worry about duplicates. It also manages the combination, compression and minification of all JS & CSS files. NOTES: * Compression/Combination/Minification is not enabled unless debug="false" is specified on the 'compiliation' element in the web.config * A new version will invalidate both client and server cache and create new persisted files -->
    <clientDependency version="209273982" fileDependencyExtensions=".js,.css" loggerType="Umbraco.Web.UI.CdfLogger, umbraco">
      <!-- This section is used for Web Forms only, the enableCompositeFiles="true" is optional and by default is set to true. The LoaderControlProvider is set to default, the javascriptPlaceHolderId, cssPlaceHolderId attributes are optional and default to what is listed below. If using this provider, then you must specify both PlaceHolder controls on your page in order to render the JS/CSS. -->
      <fileRegistration defaultProvider="PlaceHolderProvider">
          <add name="PageHeaderProvider" type="ClientDependency.Core.FileRegistration.Providers.PageHeaderProvider, ClientDependency.Core" />
          <add name="LazyLoadProvider" type="ClientDependency.Core.FileRegistration.Providers.LazyLoadProvider, ClientDependency.Core" />
          <add name="LoaderControlProvider" type="ClientDependency.Core.FileRegistration.Providers.LoaderControlProvider, ClientDependency.Core" />
          <add name="PlaceHolderProvider" type="ClientDependency.Core.FileRegistration.Providers.PlaceHolderProvider, ClientDependency.Core" javascriptPlaceHolderId="JavaScriptPlaceHolder" cssPlaceHolderId="CssPlaceHolder" />
      <!-- This section is used for MVC only -->
      <mvc defaultRenderer="StandardRenderer">
          <add name="StandardRenderer" type="ClientDependency.Core.FileRegistration.Providers.StandardRenderer, ClientDependency.Core" />
          <add name="LazyLoadRenderer" type="ClientDependency.Core.FileRegistration.Providers.LazyLoadRenderer, ClientDependency.Core" />
      <!-- The composite file section configures the compression/combination/minification of files. You can enable/disable minification of either JS/CSS files and you can enable/disable the persistence of composite files. By default, minification and persistence is enabled. Persisting files means that the system is going to save the output of the compressed/combined/minified files to disk so that on any subsequent request (when output cache expires) that these files don't have to be recreated again and will be based on the persisted file on disk. This saves on processing time. -->
      <compositeFiles defaultProvider="defaultFileProcessingProvider" compositeFileHandlerPath="~/DependencyHandler.axd">
          <add name="CompositeFileProcessor" type="ClientDependency.Core.CompositeFiles.Providers.CompositeFileProcessingProvider, ClientDependency.Core" enableCssMinify="true" enableJsMinify="true" persistFiles="true" compositeFilePath="~/App_Data/TEMP/ClientDependency" bundleDomains="localhost:123456" urlType="Base64QueryStrings" pathUrlFormat="{dependencyId}/{version}/{type}" />
        <!-- A file map provider stores references to dependency files by an id to be used in the handler URL when using the MappedId Url type -->
          <add name="XmlFileMap" type="ClientDependency.Core.CompositeFiles.Providers.XmlFileMapper, ClientDependency.Core" mapPath="~/App_Data/TEMP/ClientDependency" />

    Is there somewhere else I should looking, is that the right directoy for ClientDependency.config?

    Thanks again.

  • Sebastiaan Janssen 4942 posts 14782 karma points MVP admin hq
    Jul 09, 2014 @ 16:09
    Sebastiaan Janssen

    Change clientDependency version="209273982"to something else.. like clientDependency version="213512"

  • Ben Marte 13 posts 34 karma points
    Jul 09, 2014 @ 16:16
    Ben Marte

    Sebastian that doesn't seem to work either, no worries I guess I will have to stick with the default theme.

    Thanks again for your help.

Please Sign in or register to post replies

Write your reply to: