Skip to content
  1. Extras
  2. CMX
  3. System Settings

System Settings ​

Namespace: cmx. Settings are divided into the general, appearance, editing, modx, and completion areas.

Where to edit: System → System Settings → filter by the cmx namespace.

System values can be overridden for an individual manager user via Users → user → Settings. The theme, font size, and word wrap can also be changed in the editor's quick menu and are stored in the user's browser. The reset command restores the system values.

Existing setting values are preserved when the package is updated.

General ​

KeyTypeDefaultDescription
cmx.themecmx-comboautoTheme: auto, manager, light, light-quiet, light-solarized, dark, dark-dracula, dark-nord, dark-gruvbox, dark-vscode, dark-monokai, dark-solarized
cmx.heighttextfieldemptyEditor height in px. Empty: the original field height or the standard CMX height. TVs have a separate height property
cmx.toolbarcombo-booleanYesEditor toolbar
cmx.statusbarcombo-booleanYesStatus bar: position, selection, size, language, theme, and diagnostics
cmx.command_palettecombo-booleanYesCommand palette via Ctrl/Cmd+Shift+P

Appearance ​

KeyTypeDefaultDescription
cmx.font_familytextfieldemptyCustom monospace font. Empty: the system monospace font stack
cmx.font_sizetextfield13Font size in px
cmx.line_numberscombo-booleanYesLine numbers. Click to select a line; drag to select a range
cmx.active_linecombo-booleanYesHighlight the active line
cmx.fold_guttercombo-booleanYesBlock folding buttons in the gutter
cmx.word_wrapcombo-booleanNoWrap long lines
cmx.bracket_matchingcombo-booleanYesHighlight the matching bracket
cmx.bracket_colorscombo-booleanNoColor brackets by nesting level
cmx.indent_guidescombo-booleanYesIndentation guides
cmx.rulertextfield0Vertical ruler at the specified column; 0 disables it
cmx.highlight_trailingcombo-booleanYesHighlight trailing spaces and tabs

Editing ​

KeyTypeDefaultDescription
cmx.soft_tabscombo-booleanYesSpaces instead of the Tab character
cmx.tab_sizetextfield4Indentation width
cmx.close_bracketscombo-booleanYesAutomatically close brackets and quotes
cmx.auto_close_tagscombo-booleanYesAutomatically close HTML/MODX tags and Fenom blocks
cmx.format_buttoncombo-booleanYesIndentation formatting button on the toolbar
cmx.search_panelcombo-booleanYesSearch and replace via Ctrl/Cmd+F
cmx.highlight_matchescombo-booleanYesHighlight occurrences of the selected word
cmx.emmetcombo-booleanYesExpand Emmet abbreviations with Tab in supported contexts
cmx.autosavecombo-booleanYesLocal drafts in localStorage
cmx.autosave_lifetimetextfield240Draft retention period in minutes
cmx.keymapcmx-combostandardKeyboard layout: standard, sublime, or vim
cmx.trim_trailingcombo-booleanNoRemove trailing spaces and tabs before submitting the form

MODX Integration ​

KeyTypeDefaultDescription
cmx.goto_definitioncombo-booleanYesOpen a snippet, chunk, TV, or resource in a new tab via Ctrl/Cmd + click
cmx.hoverscombo-booleanYesHover tooltips for MODX tags, filters, and modifiers
cmx.media_buttoncombo-booleanYesButton for the standard MODX media browser
cmx.versionscombo-booleanYesSnapshots of elements and resources when saved
cmx.versions_maxtextfield20Maximum number of stored snapshots per object
cmx.php_lintcombo-booleanYesBrowser-based PHP validation and server-side php -l validation when PHP CLI is available
cmx.php_pathtextfieldphpPath to the PHP CLI executable
cmx.css_lintcombo-booleanYesValidate CSS files and <style> blocks
cmx.tvcombo-booleanYesRegister and replace TVs with the cmx input type
cmx.template_lintcombo-booleanYesValidate Fenom and MODX tags
cmx.warn_on_savecombo-booleanYesConfirm saving when critical template or PHP errors are detected

Autocompletion ​

KeyTypeDefaultDescription
cmx.autocompletecombo-booleanYesMain autocompletion switch
cmx.autocomplete_modxcombo-booleanYesMODX tags, elements, properties, filters, and property sets
cmx.autocomplete_fenomcombo-booleanYesFenom and Twig
cmx.autocomplete_phpcombo-booleanYesPHP functions and keywords
cmx.autocomplete_settingscombo-booleanYes[[++key]] system settings
cmx.autocomplete_lexiconscombo-booleanYes[[%key]] lexicon entries
cmx.autocomplete_apicombo-booleanYesMODX/xPDO API and Fenom objects
cmx.autocomplete.insert_defaultscombo-booleanYesInsert default property and filter values
cmx.autocomplete.close_tagscombo-booleanYesAdd closing constructs after selecting a suggestion
cmx.autocomplete.skeletonscombo-booleanYesInsert skeletons for block Fenom tags
cmx.snippetstextareaemptyCustom snippets, one per line: label :: text to insert

Example cmx.snippets:

text
pdoResources :: [[!pdoResources? &parents=`0` &limit=`10` &tpl=``]]
KeyRole in CMX
which_element_editorThe value cmx enables replacement of standard fields. Another value disables the editor on forms; TVs, history, and RTE name registration are handled separately
use_editorEnables the RTE branch for a resource. The context-specific value is used when available
which_editorAn empty value or cmx allows CMX for a resource without richtext. Another name leaves the field to another editor or a textarea

Optional cmx.html_elements_mime ​

This key is not created by the installer but is read by the plugin. Create it manually if you need to force a MIME type for templates, regular chunks, and HTML resources:

  • text/html;
  • text/x-smarty - Fenom;
  • text/x-twig - Twig.

Without this key, CMX selects Twig if twiggy_class is set, then Fenom if pdotools_fenom_parser is enabled, and HTML otherwise.