Skip to content
  1. Extras
  2. CMX

CMX ​

CodeMirror 6 in the MODX Revolution 3 manager: an editor for snippets, plugins, chunks, templates, files, resources without an RTE, the resource/data cache buffer, and TVs.

Package: 1.0.0-pl. Repository: vitos88/Cmx.

Features ​

  • Code editor: PHP, HTML, CSS/SCSS/Less, JavaScript, JSON, SQL, XML/SVG, Markdown, Fenom, and Twig
  • MODX integration: semantic tag highlighting, element and property autocompletion, go to element, and hover tooltips
  • Tools: search and replace, multiple cursors, Emmet, formatting, command and element palettes, and a media browser
  • Appearance: 12 themes, Standard, Sublime, and Vim keyboard layouts, and configurable fonts, word wrap, and indentation
  • Validation: PHP in the browser and via php -l, plus CSS, Fenom, and MODX tag validation
  • Change safety: local drafts with diffs and version history with viewing, comparison, and export
  • Additional features: the CMX input type for TVs and the CMX Scratchpad widget

All editor JavaScript is included in the package. No external CDNs are used for CodeMirror, language modes, or themes.

System Requirements ​

RequirementVersion
MODX Revolution3.x
PHP8.0+
PHP CLIOptional; only required for server-side php -l validation

Installation ​

  1. Download cmx-1.0.0-pl.transport.zip from the v1.0.0 release or install the Package via the installer modstore.pro
  2. Install the package via Packages → Package Management
  3. Check that which_element_editor = cmx
  4. Reload an element editing page

The installer registers the CMX plugin, creates the cmx_revision table, adds 50 settings to the cmx namespace, and adds the cmx input type and the CMX Scratchpad widget.

SectionDescription
Quick StartInstallation, elements, resources, and initial checks
System SettingsAll 50 cmx.* keys and their default values
IntegrationForms, RTE, MIME, autocompletion, TVs, drafts, and history
Keyboard ShortcutsEssential Windows/Linux and macOS shortcuts
TroubleshootingEditor, tooltips, TVs, PHP linting, drafts, and history

License ​

GNU General Public License v2.0 or, at your option, any later version.