diff --git a/plugins/editors/codemirror/codemirror.php b/plugins/editors/codemirror/codemirror.php index ff6f0153439e5..17f8dd1f296e7 100644 --- a/plugins/editors/codemirror/codemirror.php +++ b/plugins/editors/codemirror/codemirror.php @@ -234,7 +234,9 @@ public function onDisplay( } // Load the syntax mode. - $syntax = $this->params->get('syntax', 'html'); + $syntax = !empty($params['syntax']) + ? $params['syntax'] + : $this->params->get('syntax', 'html'); $options->mode = isset($this->modeAlias[$syntax]) ? $this->modeAlias[$syntax] : $syntax; // Load the theme if specified.