Posts: 3,491
Threads: 106
Joined: Mar 2010
GS 3.1 forces you to have (codemirror) syntax highlighting in the theme editor (unless you disable javascript).
I think this should be optional, just like the rich editor.
Suggestions:
- Allow disabling it in Settings, just like the WYSIWYG editor (on a per-user basis, too), e.g.: "Enable source code highlighting" (a checkbox, default on)
and/or
- gsconfig setting (e.g. something like GSNOHIGHLIGHT)
--
Another possibilty would be making this a plugin, bundled with GS, that may be disabled or removed. (It would be even better if this hypothetical plugin allowed users to disable/enable it as suggested above.)
Posts: 2,094
Threads: 54
Joined: Jan 2011
Carlos Wrote:Another possibilty would be making this a plugin, bundled with GS, that may be disabled or removed. (It would be even better if this hypothetical plugin allowed users to disable/enable it as suggested above.)
The plugin already exists:
Theme Highlighter.
It also offers GetSimple/plugin function suggestions, color preview and color chooser, etc.
It can be disabled/enabled like any other plugin.
Posts: 423
Threads: 15
Joined: Mar 2011
Carlos Wrote:I think this should be optional, just like the rich editor.
I agree with this.
While I understand that there are situations where it may be useful, it breaks It's All Text (Firefox plugin) unless Javascript is disabled (which in turn breaks so much back-end functionality). Additionally, theme components and admin header/footer sections don't benefit from syntax highlighting, which makes it an incomplete feature, too.
I was somewhat surprised to see this get in to core. It's better suited to a plugin, imo.
--
Nick.
Posts: 3,491
Threads: 106
Joined: Mar 2010
Also, codemirror is too heavy for a slow machine and makes GS less lightweight. This is the main reason why I think it's better to let the user choose.
Posts: 1,108
Threads: 70
Joined: Aug 2009
I've added an option to GSCONFIG as above , GSNOHIGHLIGHT to disable the syntax highlighting in the theme editor.
Updated codemirror to the latest version 2.23, which fixes the highlighting of mixed mode php/css/html/js highlighting.
Posts: 3,491
Threads: 106
Joined: Mar 2010
n00dles101 Wrote:I've added an option to GSCONFIG as above , GSNOHIGHLIGHT to disable the syntax highlighting in the theme editor.
Great Mike, thanks a lot.
Will test later...
Posts: 3,491
Threads: 106
Joined: Mar 2010
Tested. It works fine, but the opposite way :-)
Change both line 110 and 138 to something like:
Code:
if (!defined('GSNOHIGHLIGHT') || GSNOHIGHLIGHT!=TRUE){
EDIT: This has been fixed in
r687