Some librarians would like the ability to turn CodeMirror off in the sys prefs like OPACUserJS, IntranetUserCSS, etc. An option to disable it via syspref would be nice.
I would like to know more about why they want to disable it. Wanting to turn it off may mean it's not working well in a way that we can address.
Was going to ask the same - since it doesn't affect your input like the wysiwyg editor does, but only adds some formatting.
We had a report of indentation woes, it seems CodeMirror doesn't like mismatched combined parentheses. I.e. Enter below and go to new line: SELECT CONCAT( CONCAT('a','b') ) No indent Enter below and go to new line: SELECT CONCAT( CONCAT('a','b')) Extreme indent
Created attachment 97893 [details] [review] Bug 24497: Turn off smartIndent for SQL This only seems to effect SQL CodeMirror inputs and I belive it to be the smartIndent feature. This patch turns that off for SQL only. TEST PLAN: 1. Enter 'SELECT CONCAT( CONCAT('a','b'))' into a SQL Report and press Enter 2. Extreme indent 3. Apply patch. 4. Enter 'SELECT CONCAT( CONCAT('a','b'))' into a SQL Report and press Enter 5. No indent. 6. Check that other indenting still works proper.
Created attachment 97929 [details] [review] Bug 24497: Turn off smartIndent for SQL Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Yes! You are a life saver! Works much better!
Created attachment 97941 [details] [review] Bug 24497: Turn off smartIndent for SQL Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Nice work everyone! Pushed to master for 20.05
Pushed to 19.11.x for 19.11.03
backported to 19.05.x for 19.05.08
Backported to 18.11.x for 18.11.14.