Koha/koha-tmpl/intranet-tmpl/lib/codemirror
Owen Leonard 698efcc0aa Bug 21582: Use CodeMirror for *UserJS & *UserCSS
This patch adds CodeMirror syntax highlighting by default to JS and CSS
system preferences. HTML preferences will use CodeMirror editors if
UseWYSIWYGinSystemPreferences is disabled.

Three new CodeMirror files are added to support three new syntax
highlighting modes: XML (for HTML), CSS, and JS.

A new option is added to *.pref file configurations for textareas which
are intended for HTML, JS, or CSS: syntax. This option is passed to the
CodeMirror configuration to control syntax highlighting mode.

Textareas without a syntax option specified will not have CodeMirror
enabled.

To test, apply the patch and go to Administration -> System preferences.

Test the behavior of several preferences which use <textarea> as their
input. For example:

- OPACUserJS (JS)
- IntranetUserCSS (CSS)
- OpacHeader (HTML)
- BibtexExportAdditionalFields (no highlighting)

Text entry in each of these should have the correct syntax highlighting
applied to them. All data should be saved correctly.

Test with UseWYSIWYGinSystemPreferences both on and off.

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-12 02:28:17 +00:00
..
codemirror-compressed.js
codemirror.css
css.js Bug 21582: Use CodeMirror for *UserJS & *UserCSS 2019-04-12 02:28:17 +00:00
css.min.js Bug 21582: Use CodeMirror for *UserJS & *UserCSS 2019-04-12 02:28:17 +00:00
javascript.js Bug 21582: Use CodeMirror for *UserJS & *UserCSS 2019-04-12 02:28:17 +00:00
javascript.min.js Bug 21582: Use CodeMirror for *UserJS & *UserCSS 2019-04-12 02:28:17 +00:00
sql.js Bug 20260: Use CodeMirror for the SQL reports editor 2018-10-12 15:50:39 -03:00
sql.min.js Bug 20260: Use CodeMirror for the SQL reports editor 2018-10-12 15:50:39 -03:00
xml.js Bug 21582: Use CodeMirror for *UserJS & *UserCSS 2019-04-12 02:28:17 +00:00
xml.min.js Bug 21582: Use CodeMirror for *UserJS & *UserCSS 2019-04-12 02:28:17 +00:00