Sitecore Code Editor

Themes and Modes

There are several themes and modes that come with the code editor. To configure the field to use a theme and mode, simply enter in the source field using the following syntax:

mode=<mode>&theme=<theme>

Examples - mode=javascript
mode=css&theme=monokai
mode=markdown&theme=textmate
mode=powershell&theme=powershellise

The editor comes with the following themes:

Editor
ambiance eclipse monokai tomorrow_night
chaos github mono_industrial tomorrow_night_blue
chrome idle_fingers pastel_on_dark tomorrow_night_bright
clouds katzenmilch powershellise tomorrow_night_eighties
clouds_midnight kr solarized_dark twilight
cobalt kr_theme solarized_light vibrant_ink
crimso n_editor kuroir terminal xcode
dawn merbivore textmate
dreamweaver merbivore_soft tomorrow
Editor Mode
css - validated, supports formatting markdown - supports additional parameters
html - validated, supports formatting plain_text
javascript - validated, supports formatting powershell - use powershellise mode
json - validated text
less xml

Markdown supports additional parameters to support the runtime processing.

Editor Mode - Markdown
Support Level Standard Enhanced HTML Source Example
Safe X safemode=1&extramode=0
Extra X X X safemode=0&extramode=1
Mixed X X safemode=1&extramode=1
Default X X safemode=0&extramode=0

For default, the source settings do not need to be explicitly set.

Attribute Description Valid Values
safemode Allow a whitelisted common HTML tags to be used in authoring 0 or 1
extramode Allow advanced Markdown authoring for tables, definition lists, fenced code blocks, footnotes, abbreviations & markdown inside of html 0 or 1
markdowninhtml Allows Markdown syntax to be used inside of HTML elements* 0 or 1
autoheadingids Headings are assigned IDs based on their text using the Pandoc algorithm* 0 or 1
newwindowforexternallinks External links are assigned target="_blank" 0 or 1
newwindowforlocallinks Site links are assigned target="_blank" 0 or 1
nofollowlinks Adds a rel="nofollow" to links 0 or 1
htmlclassfootnotes CSS class applied to footnotes* Any css class name
htmlclasstitledimages CSS class applied to title images* Any css class name

* = with extramode enabled

A lot of great detail on the use of Markdown has been provided by Dan Cruickshank here:

Note: Inspiration for Markdown support in the Code Editor module goes to: