Commit 01588fee authored by walper's avatar walper

[FIX] Codemirror modes must only load if the feature is enabled. Otherwise...

[FIX] Codemirror modes must only load if the feature is enabled. Otherwise they would create a JS error. (Thx gezza)
parent db967887
......@@ -54,7 +54,10 @@ test = { mode: function () {}, indentation: function() {} }
}
TikiLib::lib("header")
->add_jsfile($jsModes)
->add_cssfile($cssModes);
// creation upfront is ok, but only include them if the feature is enabled. Otherwise we would get js errors bc codemirror itself would be missing
if (isset($prefs['feature_syntax_highlighter']) && $prefs['feature_syntax_highlighter'] == 'y') {
TikiLib::lib("header")
->add_jsfile($jsModes)
->add_cssfile($cssModes);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment