The interface of Xperience contains areas where users can enter code that defines the appearance or behavior of websites. The code fields use an editor that provides syntax highlighting and other features to help website developers write and maintain sections of code.
Highlighting ensures that text elements are displayed in different colors depending on the syntax of the given language. Syntax highlighting improves the readability of code and makes it easier to spot and avoid mistakes. All languages commonly used for web development are supported, including HTML, ASPX markup, CSS, JavaScript, SQL, XML and C#. Each language has its own set of highlighting rules for code formatting.
In addition to syntax highlighting, the editor also provides other types of functionality:
The panel on the right is an alphabetical list of bookmarks that allows users to jump to marked sections in the code. You can insert bookmarks using code blocks (regions) following the syntax of the currently edited language, for example /* #<bookmark name># */ for CSS.
You can modify how the code editor applies colors and other styles to various syntax tokens of individual languages:
You can adjust the behavior of all code editors in the administration interface by adding the following keys into the /configuration/appSettings section of your administration project's web.config file:
Web.config key | Description | Sample value |
|---|---|---|
CMSEnableSyntaxHighlighting | Globally enables or disables the code editor and syntax highlighting support for all code fields in the administration interface. You can disable the editor if it is causing performance issues or other problems. The default value is true. | XML |
CMSEnableSyntaxHighlighting.<Language> | Allows you to disable the code editor and syntax highlighting support for fields that display code in a specific language. Replace <Language> in the key name with the name of the language that you wish to disable. The following language options are available:
All languages are enabled by default. | XML |