[Koha-bugs] [Bug 21582] Use CodeMirror for *UserJS & *UserCSS

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Apr 1 17:55:59 CEST 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21582

Liz Rea <wizzyrea at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #87278|0                           |1
        is obsolete|                            |

--- Comment #17 from Liz Rea <wizzyrea at gmail.com> ---
Created attachment 87288
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=87288&action=edit
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 at gmail.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list