[Bug 13829] New: Syntax highlighter on source code textareas
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13829 Bug ID: 13829 Summary: Syntax highlighter on source code textareas Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: System Administration Assignee: koha-bugs@lists.koha-community.org Reporter: pablo.bianchi@gmail.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com Some textareas contain source code. For example SQL reports (not even monospace font) and some sysprefs (4 with JS, 18 with HTML). Would be a nice (and pretty easy) enhancement to offer syntax highlight on all of them, with very little page overload. There are a lot of alternatives: - SyntaxHighlighter - Highlight.js - Google Code Prettify (like StackOverflow) - Snippet - PrismJs -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13829 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13829 paxed <pasi.kallinen@pttk.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pasi.kallinen@pttk.fi --- Comment #1 from paxed <pasi.kallinen@pttk.fi> --- (In reply to Pablo AB from comment #0)
Some textareas contain source code. For example SQL reports (not even monospace font)
For monospace font in SQL report textarea, add this to IntranetUserCSS: #rep_guided_reports_start textarea#sql { font-family: monospace; } -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13829 --- Comment #2 from Pablo AB <pablo.bianchi@gmail.com> --- Thanks! I had already done it jQuery, but is better your choice: $('#rep_guided_reports_start textarea#sql').css("font-family", "monospace" ); BTW, I thought jquery/plugins/jquery.highlight-3.js could help me, but is a very basic highlight. Maybe we can use a better text highlighter jquery plugin that do the full job (for both search and source code syntax highlight). Also (and this could be another enhancement) I wonder if there is a good reason why we don't have (AFAIK) a syspref to add anything to head HTML tag to both opac and intranet. That's would let anyone to add their own jquery plugins. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org