Changeset 17742


Ignore:
Timestamp:
04/30/14 13:26:26 (11 years ago)
Author:
tbretz
Message:
Updated codemirror config; automatically colorize code snippets
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/www/viewer/index.js

    r17738 r17742  
    117117        //value: "function myScript(){return 100;}\n",
    118118        mode:  { name: "text/typescript", globalVars: true },
    119         lineNumbers: true,
     119        indentUnit: 4,
    120120        styleActiveLine: true,
    121121        matchBrackets: true,
    122         indentUnit: 4,
     122        lineNumbers: true,
    123123        foldGutter: true,
    124         gutters: ["CodeMirror-linenumbers", "CodeMirror-foldgutter"],
     124        lint: true,
     125        highlightSelectionMatches: {showToken: /\w/},
     126        gutters: ["CodeMirror-lint-markers", "CodeMirror-linenumbers", "CodeMirror-foldgutter"],
    125127        extraKeys: {
    126128            //"Ctrl-D": "duplicateLine",
     
    147149            },
    148150        }
    149 
    150151    };
    151152
     
    209210function onReady()
    210211{
     212    CodeMirror.colorize(null, 'javascript');
     213
    211214    //$('input,select').keypress(function(event) { return event.keyCode != 13; });
    212215
Note: See TracChangeset for help on using the changeset viewer.