gump 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +24 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +71 -0
- data/Rakefile +2 -0
- data/bin/gump +37 -0
- data/gump.gemspec +17 -0
- data/lib/gump.rb +50 -0
- data/lib/version.rb +3 -0
- data/server/assets/css/style.css +6949 -0
- data/server/assets/images/arrow.png +0 -0
- data/server/assets/images/logo.png +0 -0
- data/server/assets/js/bootstrap/dist/css/bootstrap-theme.css +347 -0
- data/server/assets/js/bootstrap/dist/css/bootstrap-theme.css.map +1 -0
- data/server/assets/js/bootstrap/dist/css/bootstrap-theme.min.css +7 -0
- data/server/assets/js/bootstrap/dist/css/bootstrap.css +5785 -0
- data/server/assets/js/bootstrap/dist/css/bootstrap.css.map +1 -0
- data/server/assets/js/bootstrap/dist/css/bootstrap.min.css +7 -0
- data/server/assets/js/bootstrap/dist/fonts/glyphicons-halflings-regular.eot +0 -0
- data/server/assets/js/bootstrap/dist/fonts/glyphicons-halflings-regular.svg +229 -0
- data/server/assets/js/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/server/assets/js/bootstrap/dist/fonts/glyphicons-halflings-regular.woff +0 -0
- data/server/assets/js/bootstrap/dist/js/bootstrap.js +1951 -0
- data/server/assets/js/bootstrap/dist/js/bootstrap.min.js +6 -0
- data/server/assets/js/jquery.codemirror/.gitattributes +8 -0
- data/server/assets/js/jquery.codemirror/.gitignore +6 -0
- data/server/assets/js/jquery.codemirror/.travis.yml +3 -0
- data/server/assets/js/jquery.codemirror/AUTHORS +255 -0
- data/server/assets/js/jquery.codemirror/CONTRIBUTING.md +72 -0
- data/server/assets/js/jquery.codemirror/LICENSE +19 -0
- data/server/assets/js/jquery.codemirror/README.md +11 -0
- data/server/assets/js/jquery.codemirror/addon/comment/comment.js +145 -0
- data/server/assets/js/jquery.codemirror/addon/comment/continuecomment.js +54 -0
- data/server/assets/js/jquery.codemirror/addon/dialog/dialog.css +32 -0
- data/server/assets/js/jquery.codemirror/addon/dialog/dialog.js +121 -0
- data/server/assets/js/jquery.codemirror/addon/display/fullscreen.css +6 -0
- data/server/assets/js/jquery.codemirror/addon/display/fullscreen.js +31 -0
- data/server/assets/js/jquery.codemirror/addon/display/placeholder.js +48 -0
- data/server/assets/js/jquery.codemirror/addon/edit/closebrackets.js +82 -0
- data/server/assets/js/jquery.codemirror/addon/edit/closetag.js +89 -0
- data/server/assets/js/jquery.codemirror/addon/edit/continuelist.js +25 -0
- data/server/assets/js/jquery.codemirror/addon/edit/matchbrackets.js +87 -0
- data/server/assets/js/jquery.codemirror/addon/edit/matchtags.js +56 -0
- data/server/assets/js/jquery.codemirror/addon/edit/trailingspace.js +15 -0
- data/server/assets/js/jquery.codemirror/addon/fold/brace-fold.js +93 -0
- data/server/assets/js/jquery.codemirror/addon/fold/comment-fold.js +40 -0
- data/server/assets/js/jquery.codemirror/addon/fold/foldcode.js +75 -0
- data/server/assets/js/jquery.codemirror/addon/fold/foldgutter.css +21 -0
- data/server/assets/js/jquery.codemirror/addon/fold/foldgutter.js +124 -0
- data/server/assets/js/jquery.codemirror/addon/fold/indent-fold.js +30 -0
- data/server/assets/js/jquery.codemirror/addon/fold/xml-fold.js +167 -0
- data/server/assets/js/jquery.codemirror/addon/hint/anyword-hint.js +34 -0
- data/server/assets/js/jquery.codemirror/addon/hint/css-hint.js +50 -0
- data/server/assets/js/jquery.codemirror/addon/hint/html-hint.js +337 -0
- data/server/assets/js/jquery.codemirror/addon/hint/javascript-hint.js +131 -0
- data/server/assets/js/jquery.codemirror/addon/hint/pig-hint.js +121 -0
- data/server/assets/js/jquery.codemirror/addon/hint/python-hint.js +95 -0
- data/server/assets/js/jquery.codemirror/addon/hint/show-hint.css +38 -0
- data/server/assets/js/jquery.codemirror/addon/hint/show-hint.js +286 -0
- data/server/assets/js/jquery.codemirror/addon/hint/sql-hint.js +105 -0
- data/server/assets/js/jquery.codemirror/addon/hint/xml-hint.js +69 -0
- data/server/assets/js/jquery.codemirror/addon/lint/coffeescript-lint.js +27 -0
- data/server/assets/js/jquery.codemirror/addon/lint/css-lint.js +19 -0
- data/server/assets/js/jquery.codemirror/addon/lint/javascript-lint.js +126 -0
- data/server/assets/js/jquery.codemirror/addon/lint/json-lint.js +17 -0
- data/server/assets/js/jquery.codemirror/addon/lint/lint.css +73 -0
- data/server/assets/js/jquery.codemirror/addon/lint/lint.js +203 -0
- data/server/assets/js/jquery.codemirror/addon/merge/dep/diff_match_patch.js +50 -0
- data/server/assets/js/jquery.codemirror/addon/merge/merge.css +92 -0
- data/server/assets/js/jquery.codemirror/addon/merge/merge.js +474 -0
- data/server/assets/js/jquery.codemirror/addon/mode/loadmode.js +51 -0
- data/server/assets/js/jquery.codemirror/addon/mode/multiplex.js +101 -0
- data/server/assets/js/jquery.codemirror/addon/mode/multiplex_test.js +30 -0
- data/server/assets/js/jquery.codemirror/addon/mode/overlay.js +59 -0
- data/server/assets/js/jquery.codemirror/addon/runmode/colorize.js +29 -0
- data/server/assets/js/jquery.codemirror/addon/runmode/runmode-standalone.js +136 -0
- data/server/assets/js/jquery.codemirror/addon/runmode/runmode.js +56 -0
- data/server/assets/js/jquery.codemirror/addon/runmode/runmode.node.js +103 -0
- data/server/assets/js/jquery.codemirror/addon/scroll/scrollpastend.js +34 -0
- data/server/assets/js/jquery.codemirror/addon/search/match-highlighter.js +91 -0
- data/server/assets/js/jquery.codemirror/addon/search/search.js +133 -0
- data/server/assets/js/jquery.codemirror/addon/search/searchcursor.js +143 -0
- data/server/assets/js/jquery.codemirror/addon/selection/active-line.js +39 -0
- data/server/assets/js/jquery.codemirror/addon/selection/mark-selection.js +108 -0
- data/server/assets/js/jquery.codemirror/addon/tern/tern.css +85 -0
- data/server/assets/js/jquery.codemirror/addon/tern/tern.js +632 -0
- data/server/assets/js/jquery.codemirror/addon/tern/worker.js +41 -0
- data/server/assets/js/jquery.codemirror/addon/wrap/hardwrap.js +99 -0
- data/server/assets/js/jquery.codemirror/bin/authors.sh +6 -0
- data/server/assets/js/jquery.codemirror/bin/compress +92 -0
- data/server/assets/js/jquery.codemirror/bin/lint +16 -0
- data/server/assets/js/jquery.codemirror/bin/source-highlight +61 -0
- data/server/assets/js/jquery.codemirror/bower.json +15 -0
- data/server/assets/js/jquery.codemirror/demo/activeline.html +78 -0
- data/server/assets/js/jquery.codemirror/demo/anywordhint.html +79 -0
- data/server/assets/js/jquery.codemirror/demo/bidi.html +74 -0
- data/server/assets/js/jquery.codemirror/demo/btree.html +86 -0
- data/server/assets/js/jquery.codemirror/demo/buffers.html +109 -0
- data/server/assets/js/jquery.codemirror/demo/changemode.html +59 -0
- data/server/assets/js/jquery.codemirror/demo/closebrackets.html +63 -0
- data/server/assets/js/jquery.codemirror/demo/closetag.html +40 -0
- data/server/assets/js/jquery.codemirror/demo/complete.html +80 -0
- data/server/assets/js/jquery.codemirror/demo/emacs.html +75 -0
- data/server/assets/js/jquery.codemirror/demo/folding.html +75 -0
- data/server/assets/js/jquery.codemirror/demo/fullscreen.html +130 -0
- data/server/assets/js/jquery.codemirror/demo/hardwrap.html +69 -0
- data/server/assets/js/jquery.codemirror/demo/html5complete.html +54 -0
- data/server/assets/js/jquery.codemirror/demo/indentwrap.html +58 -0
- data/server/assets/js/jquery.codemirror/demo/lint.html +171 -0
- data/server/assets/js/jquery.codemirror/demo/loadmode.html +49 -0
- data/server/assets/js/jquery.codemirror/demo/marker.html +52 -0
- data/server/assets/js/jquery.codemirror/demo/markselection.html +45 -0
- data/server/assets/js/jquery.codemirror/demo/matchhighlighter.html +47 -0
- data/server/assets/js/jquery.codemirror/demo/matchtags.html +49 -0
- data/server/assets/js/jquery.codemirror/demo/merge.html +82 -0
- data/server/assets/js/jquery.codemirror/demo/multiplex.html +75 -0
- data/server/assets/js/jquery.codemirror/demo/mustache.html +68 -0
- data/server/assets/js/jquery.codemirror/demo/placeholder.html +45 -0
- data/server/assets/js/jquery.codemirror/demo/preview.html +88 -0
- data/server/assets/js/jquery.codemirror/demo/resize.html +58 -0
- data/server/assets/js/jquery.codemirror/demo/runmode.html +62 -0
- data/server/assets/js/jquery.codemirror/demo/search.html +94 -0
- data/server/assets/js/jquery.codemirror/demo/spanaffectswrapping_shim.html +85 -0
- data/server/assets/js/jquery.codemirror/demo/tern.html +129 -0
- data/server/assets/js/jquery.codemirror/demo/theme.html +121 -0
- data/server/assets/js/jquery.codemirror/demo/trailingspace.html +48 -0
- data/server/assets/js/jquery.codemirror/demo/variableheight.html +67 -0
- data/server/assets/js/jquery.codemirror/demo/vim.html +74 -0
- data/server/assets/js/jquery.codemirror/demo/visibletabs.html +62 -0
- data/server/assets/js/jquery.codemirror/demo/widget.html +85 -0
- data/server/assets/js/jquery.codemirror/demo/xmlcomplete.html +116 -0
- data/server/assets/js/jquery.codemirror/index.html +192 -0
- data/server/assets/js/jquery.codemirror/keymap/emacs.js +387 -0
- data/server/assets/js/jquery.codemirror/keymap/extra.js +43 -0
- data/server/assets/js/jquery.codemirror/keymap/vim.js +3703 -0
- data/server/assets/js/jquery.codemirror/lib/codemirror.css +263 -0
- data/server/assets/js/jquery.codemirror/lib/codemirror.js +5944 -0
- data/server/assets/js/jquery.codemirror/mode/apl/apl.js +160 -0
- data/server/assets/js/jquery.codemirror/mode/apl/index.html +72 -0
- data/server/assets/js/jquery.codemirror/mode/asterisk/asterisk.js +183 -0
- data/server/assets/js/jquery.codemirror/mode/asterisk/index.html +154 -0
- data/server/assets/js/jquery.codemirror/mode/clike/clike.js +362 -0
- data/server/assets/js/jquery.codemirror/mode/clike/index.html +195 -0
- data/server/assets/js/jquery.codemirror/mode/clike/scala.html +767 -0
- data/server/assets/js/jquery.codemirror/mode/clojure/clojure.js +224 -0
- data/server/assets/js/jquery.codemirror/mode/clojure/index.html +88 -0
- data/server/assets/js/jquery.codemirror/mode/cobol/cobol.js +240 -0
- data/server/assets/js/jquery.codemirror/mode/cobol/index.html +210 -0
- data/server/assets/js/jquery.codemirror/mode/coffeescript/coffeescript.js +354 -0
- data/server/assets/js/jquery.codemirror/mode/coffeescript/index.html +740 -0
- data/server/assets/js/jquery.codemirror/mode/commonlisp/commonlisp.js +105 -0
- data/server/assets/js/jquery.codemirror/mode/commonlisp/index.html +177 -0
- data/server/assets/js/jquery.codemirror/mode/css/css.js +639 -0
- data/server/assets/js/jquery.codemirror/mode/css/index.html +70 -0
- data/server/assets/js/jquery.codemirror/mode/css/scss.html +157 -0
- data/server/assets/js/jquery.codemirror/mode/css/scss_test.js +93 -0
- data/server/assets/js/jquery.codemirror/mode/css/test.js +142 -0
- data/server/assets/js/jquery.codemirror/mode/d/d.js +205 -0
- data/server/assets/js/jquery.codemirror/mode/d/index.html +273 -0
- data/server/assets/js/jquery.codemirror/mode/diff/diff.js +32 -0
- data/server/assets/js/jquery.codemirror/mode/diff/index.html +117 -0
- data/server/assets/js/jquery.codemirror/mode/dtd/dtd.js +127 -0
- data/server/assets/js/jquery.codemirror/mode/dtd/index.html +89 -0
- data/server/assets/js/jquery.codemirror/mode/ecl/ecl.js +192 -0
- data/server/assets/js/jquery.codemirror/mode/ecl/index.html +52 -0
- data/server/assets/js/jquery.codemirror/mode/eiffel/eiffel.js +147 -0
- data/server/assets/js/jquery.codemirror/mode/eiffel/index.html +430 -0
- data/server/assets/js/jquery.codemirror/mode/erlang/erlang.js +484 -0
- data/server/assets/js/jquery.codemirror/mode/erlang/index.html +75 -0
- data/server/assets/js/jquery.codemirror/mode/fortran/fortran.js +173 -0
- data/server/assets/js/jquery.codemirror/mode/fortran/index.html +81 -0
- data/server/assets/js/jquery.codemirror/mode/gas/gas.js +330 -0
- data/server/assets/js/jquery.codemirror/mode/gas/index.html +68 -0
- data/server/assets/js/jquery.codemirror/mode/gfm/gfm.js +97 -0
- data/server/assets/js/jquery.codemirror/mode/gfm/index.html +82 -0
- data/server/assets/js/jquery.codemirror/mode/gfm/test.js +112 -0
- data/server/assets/js/jquery.codemirror/mode/gherkin/gherkin.js +168 -0
- data/server/assets/js/jquery.codemirror/mode/gherkin/index.html +48 -0
- data/server/assets/js/jquery.codemirror/mode/go/go.js +168 -0
- data/server/assets/js/jquery.codemirror/mode/go/index.html +85 -0
- data/server/assets/js/jquery.codemirror/mode/groovy/groovy.js +211 -0
- data/server/assets/js/jquery.codemirror/mode/groovy/index.html +84 -0
- data/server/assets/js/jquery.codemirror/mode/haml/haml.js +153 -0
- data/server/assets/js/jquery.codemirror/mode/haml/index.html +79 -0
- data/server/assets/js/jquery.codemirror/mode/haml/test.js +94 -0
- data/server/assets/js/jquery.codemirror/mode/haskell/haskell.js +250 -0
- data/server/assets/js/jquery.codemirror/mode/haskell/index.html +73 -0
- data/server/assets/js/jquery.codemirror/mode/haxe/haxe.js +429 -0
- data/server/assets/js/jquery.codemirror/mode/haxe/index.html +103 -0
- data/server/assets/js/jquery.codemirror/mode/htmlembedded/htmlembedded.js +73 -0
- data/server/assets/js/jquery.codemirror/mode/htmlembedded/index.html +60 -0
- data/server/assets/js/jquery.codemirror/mode/htmlmixed/htmlmixed.js +104 -0
- data/server/assets/js/jquery.codemirror/mode/htmlmixed/index.html +85 -0
- data/server/assets/js/jquery.codemirror/mode/http/http.js +98 -0
- data/server/assets/js/jquery.codemirror/mode/http/index.html +45 -0
- data/server/assets/js/jquery.codemirror/mode/index.html +114 -0
- data/server/assets/js/jquery.codemirror/mode/jade/index.html +66 -0
- data/server/assets/js/jquery.codemirror/mode/jade/jade.js +90 -0
- data/server/assets/js/jquery.codemirror/mode/javascript/index.html +107 -0
- data/server/assets/js/jquery.codemirror/mode/javascript/javascript.js +617 -0
- data/server/assets/js/jquery.codemirror/mode/javascript/test.js +72 -0
- data/server/assets/js/jquery.codemirror/mode/javascript/typescript.html +61 -0
- data/server/assets/js/jquery.codemirror/mode/jinja2/index.html +50 -0
- data/server/assets/js/jquery.codemirror/mode/jinja2/jinja2.js +42 -0
- data/server/assets/js/jquery.codemirror/mode/julia/index.html +187 -0
- data/server/assets/js/jquery.codemirror/mode/julia/julia.js +262 -0
- data/server/assets/js/jquery.codemirror/mode/less/index.html +753 -0
- data/server/assets/js/jquery.codemirror/mode/less/less.js +346 -0
- data/server/assets/js/jquery.codemirror/mode/livescript/index.html +459 -0
- data/server/assets/js/jquery.codemirror/mode/livescript/livescript.js +267 -0
- data/server/assets/js/jquery.codemirror/mode/livescript/livescript.ls +266 -0
- data/server/assets/js/jquery.codemirror/mode/lua/index.html +86 -0
- data/server/assets/js/jquery.codemirror/mode/lua/lua.js +144 -0
- data/server/assets/js/jquery.codemirror/mode/markdown/index.html +359 -0
- data/server/assets/js/jquery.codemirror/mode/markdown/markdown.js +560 -0
- data/server/assets/js/jquery.codemirror/mode/markdown/test.js +664 -0
- data/server/assets/js/jquery.codemirror/mode/meta.js +91 -0
- data/server/assets/js/jquery.codemirror/mode/mirc/index.html +161 -0
- data/server/assets/js/jquery.codemirror/mode/mirc/mirc.js +177 -0
- data/server/assets/js/jquery.codemirror/mode/nginx/index.html +181 -0
- data/server/assets/js/jquery.codemirror/mode/nginx/nginx.js +163 -0
- data/server/assets/js/jquery.codemirror/mode/ntriples/index.html +45 -0
- data/server/assets/js/jquery.codemirror/mode/ntriples/ntriples.js +170 -0
- data/server/assets/js/jquery.codemirror/mode/ocaml/index.html +146 -0
- data/server/assets/js/jquery.codemirror/mode/ocaml/ocaml.js +116 -0
- data/server/assets/js/jquery.codemirror/mode/octave/index.html +95 -0
- data/server/assets/js/jquery.codemirror/mode/octave/octave.js +118 -0
- data/server/assets/js/jquery.codemirror/mode/pascal/index.html +61 -0
- data/server/assets/js/jquery.codemirror/mode/pascal/pascal.js +94 -0
- data/server/assets/js/jquery.codemirror/mode/pegjs/index.html +66 -0
- data/server/assets/js/jquery.codemirror/mode/pegjs/pegjs.js +103 -0
- data/server/assets/js/jquery.codemirror/mode/perl/index.html +75 -0
- data/server/assets/js/jquery.codemirror/mode/perl/perl.js +816 -0
- data/server/assets/js/jquery.codemirror/mode/php/index.html +62 -0
- data/server/assets/js/jquery.codemirror/mode/php/php.js +132 -0
- data/server/assets/js/jquery.codemirror/mode/pig/index.html +55 -0
- data/server/assets/js/jquery.codemirror/mode/pig/pig.js +171 -0
- data/server/assets/js/jquery.codemirror/mode/properties/index.html +53 -0
- data/server/assets/js/jquery.codemirror/mode/properties/properties.js +63 -0
- data/server/assets/js/jquery.codemirror/mode/python/index.html +187 -0
- data/server/assets/js/jquery.codemirror/mode/python/python.js +368 -0
- data/server/assets/js/jquery.codemirror/mode/q/index.html +144 -0
- data/server/assets/js/jquery.codemirror/mode/q/q.js +124 -0
- data/server/assets/js/jquery.codemirror/mode/r/index.html +86 -0
- data/server/assets/js/jquery.codemirror/mode/r/r.js +141 -0
- data/server/assets/js/jquery.codemirror/mode/rpm/changes/changes.js +19 -0
- data/server/assets/js/jquery.codemirror/mode/rpm/changes/index.html +67 -0
- data/server/assets/js/jquery.codemirror/mode/rpm/spec/index.html +114 -0
- data/server/assets/js/jquery.codemirror/mode/rpm/spec/spec.css +5 -0
- data/server/assets/js/jquery.codemirror/mode/rpm/spec/spec.js +66 -0
- data/server/assets/js/jquery.codemirror/mode/rst/index.html +534 -0
- data/server/assets/js/jquery.codemirror/mode/rst/rst.js +560 -0
- data/server/assets/js/jquery.codemirror/mode/ruby/index.html +185 -0
- data/server/assets/js/jquery.codemirror/mode/ruby/ruby.js +247 -0
- data/server/assets/js/jquery.codemirror/mode/rust/index.html +61 -0
- data/server/assets/js/jquery.codemirror/mode/rust/rust.js +436 -0
- data/server/assets/js/jquery.codemirror/mode/sass/index.html +66 -0
- data/server/assets/js/jquery.codemirror/mode/sass/sass.js +330 -0
- data/server/assets/js/jquery.codemirror/mode/scheme/index.html +77 -0
- data/server/assets/js/jquery.codemirror/mode/scheme/scheme.js +232 -0
- data/server/assets/js/jquery.codemirror/mode/shell/index.html +66 -0
- data/server/assets/js/jquery.codemirror/mode/shell/shell.js +118 -0
- data/server/assets/js/jquery.codemirror/mode/sieve/index.html +93 -0
- data/server/assets/js/jquery.codemirror/mode/sieve/sieve.js +183 -0
- data/server/assets/js/jquery.codemirror/mode/smalltalk/index.html +68 -0
- data/server/assets/js/jquery.codemirror/mode/smalltalk/smalltalk.js +151 -0
- data/server/assets/js/jquery.codemirror/mode/smarty/index.html +136 -0
- data/server/assets/js/jquery.codemirror/mode/smarty/smarty.js +205 -0
- data/server/assets/js/jquery.codemirror/mode/smartymixed/index.html +114 -0
- data/server/assets/js/jquery.codemirror/mode/smartymixed/smartymixed.js +175 -0
- data/server/assets/js/jquery.codemirror/mode/sparql/index.html +54 -0
- data/server/assets/js/jquery.codemirror/mode/sparql/sparql.js +145 -0
- data/server/assets/js/jquery.codemirror/mode/sql/index.html +75 -0
- data/server/assets/js/jquery.codemirror/mode/sql/sql.js +365 -0
- data/server/assets/js/jquery.codemirror/mode/stex/index.html +110 -0
- data/server/assets/js/jquery.codemirror/mode/stex/stex.js +246 -0
- data/server/assets/js/jquery.codemirror/mode/stex/test.js +120 -0
- data/server/assets/js/jquery.codemirror/mode/tcl/index.html +143 -0
- data/server/assets/js/jquery.codemirror/mode/tcl/tcl.js +131 -0
- data/server/assets/js/jquery.codemirror/mode/tiddlywiki/index.html +155 -0
- data/server/assets/js/jquery.codemirror/mode/tiddlywiki/tiddlywiki.css +14 -0
- data/server/assets/js/jquery.codemirror/mode/tiddlywiki/tiddlywiki.js +353 -0
- data/server/assets/js/jquery.codemirror/mode/tiki/index.html +95 -0
- data/server/assets/js/jquery.codemirror/mode/tiki/tiki.css +26 -0
- data/server/assets/js/jquery.codemirror/mode/tiki/tiki.js +308 -0
- data/server/assets/js/jquery.codemirror/mode/toml/index.html +73 -0
- data/server/assets/js/jquery.codemirror/mode/toml/toml.js +71 -0
- data/server/assets/js/jquery.codemirror/mode/turtle/index.html +51 -0
- data/server/assets/js/jquery.codemirror/mode/turtle/turtle.js +145 -0
- data/server/assets/js/jquery.codemirror/mode/vb/index.html +103 -0
- data/server/assets/js/jquery.codemirror/mode/vb/vb.js +259 -0
- data/server/assets/js/jquery.codemirror/mode/vbscript/index.html +55 -0
- data/server/assets/js/jquery.codemirror/mode/vbscript/vbscript.js +334 -0
- data/server/assets/js/jquery.codemirror/mode/velocity/index.html +119 -0
- data/server/assets/js/jquery.codemirror/mode/velocity/velocity.js +186 -0
- data/server/assets/js/jquery.codemirror/mode/verilog/index.html +132 -0
- data/server/assets/js/jquery.codemirror/mode/verilog/verilog.js +182 -0
- data/server/assets/js/jquery.codemirror/mode/xml/index.html +57 -0
- data/server/assets/js/jquery.codemirror/mode/xml/xml.js +345 -0
- data/server/assets/js/jquery.codemirror/mode/xquery/index.html +210 -0
- data/server/assets/js/jquery.codemirror/mode/xquery/test.js +64 -0
- data/server/assets/js/jquery.codemirror/mode/xquery/xquery.js +432 -0
- data/server/assets/js/jquery.codemirror/mode/yaml/index.html +80 -0
- data/server/assets/js/jquery.codemirror/mode/yaml/yaml.js +97 -0
- data/server/assets/js/jquery.codemirror/mode/z80/index.html +52 -0
- data/server/assets/js/jquery.codemirror/mode/z80/z80.js +85 -0
- data/server/assets/js/jquery.codemirror/package.json +19 -0
- data/server/assets/js/jquery.codemirror/test/comment_test.js +51 -0
- data/server/assets/js/jquery.codemirror/test/doc_test.js +329 -0
- data/server/assets/js/jquery.codemirror/test/driver.js +139 -0
- data/server/assets/js/jquery.codemirror/test/emacs_test.js +135 -0
- data/server/assets/js/jquery.codemirror/test/index.html +209 -0
- data/server/assets/js/jquery.codemirror/test/lint/acorn.js +1593 -0
- data/server/assets/js/jquery.codemirror/test/lint/lint.js +139 -0
- data/server/assets/js/jquery.codemirror/test/lint/walk.js +216 -0
- data/server/assets/js/jquery.codemirror/test/mode_test.css +10 -0
- data/server/assets/js/jquery.codemirror/test/mode_test.js +200 -0
- data/server/assets/js/jquery.codemirror/test/phantom_driver.js +31 -0
- data/server/assets/js/jquery.codemirror/test/run.js +34 -0
- data/server/assets/js/jquery.codemirror/test/test.js +1562 -0
- data/server/assets/js/jquery.codemirror/test/vim_test.js +2391 -0
- data/server/assets/js/jquery.codemirror/theme/3024-day.css +34 -0
- data/server/assets/js/jquery.codemirror/theme/3024-night.css +34 -0
- data/server/assets/js/jquery.codemirror/theme/ambiance-mobile.css +5 -0
- data/server/assets/js/jquery.codemirror/theme/ambiance.css +70 -0
- data/server/assets/js/jquery.codemirror/theme/base16-dark.css +34 -0
- data/server/assets/js/jquery.codemirror/theme/base16-light.css +34 -0
- data/server/assets/js/jquery.codemirror/theme/blackboard.css +28 -0
- data/server/assets/js/jquery.codemirror/theme/cobalt.css +21 -0
- data/server/assets/js/jquery.codemirror/theme/eclipse.css +23 -0
- data/server/assets/js/jquery.codemirror/theme/elegant.css +13 -0
- data/server/assets/js/jquery.codemirror/theme/erlang-dark.css +30 -0
- data/server/assets/js/jquery.codemirror/theme/lesser-dark.css +47 -0
- data/server/assets/js/jquery.codemirror/theme/mbo.css +37 -0
- data/server/assets/js/jquery.codemirror/theme/midnight.css +43 -0
- data/server/assets/js/jquery.codemirror/theme/monokai.css +29 -0
- data/server/assets/js/jquery.codemirror/theme/neat.css +12 -0
- data/server/assets/js/jquery.codemirror/theme/night.css +24 -0
- data/server/assets/js/jquery.codemirror/theme/paraiso-dark.css +34 -0
- data/server/assets/js/jquery.codemirror/theme/paraiso-light.css +34 -0
- data/server/assets/js/jquery.codemirror/theme/rubyblue.css +23 -0
- data/server/assets/js/jquery.codemirror/theme/solarized.css +180 -0
- data/server/assets/js/jquery.codemirror/theme/the-matrix.css +26 -0
- data/server/assets/js/jquery.codemirror/theme/tomorrow-night-eighties.css +34 -0
- data/server/assets/js/jquery.codemirror/theme/twilight.css +28 -0
- data/server/assets/js/jquery.codemirror/theme/vibrant-ink.css +30 -0
- data/server/assets/js/jquery.codemirror/theme/xq-dark.css +49 -0
- data/server/assets/js/jquery.codemirror/theme/xq-light.css +43 -0
- data/server/assets/js/jquery.js +4 -0
- data/server/assets/js/jquery.nanoscroller/jquery.nanoscroller.js +2 -0
- data/server/assets/js/jquery.nanoscroller/nanoscroller.css +49 -0
- data/server/assets/js/tester.js +161 -0
- data/server/config.ru +2 -0
- data/server/server.rb +41 -0
- data/server/views/_content.erb +65 -0
- data/server/views/_sidebar.erb +32 -0
- data/server/views/index.erb +40 -0
- metadata +402 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
|
|
3
|
+
<title>CodeMirror: Multiplexing Parser Demo</title>
|
|
4
|
+
<meta charset="utf-8"/>
|
|
5
|
+
<link rel=stylesheet href="../doc/docs.css">
|
|
6
|
+
|
|
7
|
+
<link rel="stylesheet" href="../lib/codemirror.css">
|
|
8
|
+
<script src="../lib/codemirror.js"></script>
|
|
9
|
+
<script src="../addon/mode/multiplex.js"></script>
|
|
10
|
+
<script src="../mode/xml/xml.js"></script>
|
|
11
|
+
<style type="text/css">
|
|
12
|
+
.CodeMirror {border: 1px solid black;}
|
|
13
|
+
.cm-delimit {color: #fa4;}
|
|
14
|
+
</style>
|
|
15
|
+
<div id=nav>
|
|
16
|
+
<a href="http://codemirror.net"><img id=logo src="../doc/logo.png"></a>
|
|
17
|
+
|
|
18
|
+
<ul>
|
|
19
|
+
<li><a href="../index.html">Home</a>
|
|
20
|
+
<li><a href="../doc/manual.html">Manual</a>
|
|
21
|
+
<li><a href="https://github.com/marijnh/codemirror">Code</a>
|
|
22
|
+
</ul>
|
|
23
|
+
<ul>
|
|
24
|
+
<li><a class=active href="#">Multiplexing Parser</a>
|
|
25
|
+
</ul>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<article>
|
|
29
|
+
<h2>Multiplexing Parser Demo</h2>
|
|
30
|
+
<form><textarea id="code" name="code">
|
|
31
|
+
<html>
|
|
32
|
+
<body style="<<magic>>">
|
|
33
|
+
<h1><< this is not <html >></h1>
|
|
34
|
+
<<
|
|
35
|
+
multiline
|
|
36
|
+
not html
|
|
37
|
+
at all : &amp; <link/>
|
|
38
|
+
>>
|
|
39
|
+
<p>this is html again</p>
|
|
40
|
+
</body>
|
|
41
|
+
</html>
|
|
42
|
+
</textarea></form>
|
|
43
|
+
|
|
44
|
+
<script>
|
|
45
|
+
CodeMirror.defineMode("demo", function(config) {
|
|
46
|
+
return CodeMirror.multiplexingMode(
|
|
47
|
+
CodeMirror.getMode(config, "text/html"),
|
|
48
|
+
{open: "<<", close: ">>",
|
|
49
|
+
mode: CodeMirror.getMode(config, "text/plain"),
|
|
50
|
+
delimStyle: "delimit"}
|
|
51
|
+
// .. more multiplexed styles can follow here
|
|
52
|
+
);
|
|
53
|
+
});
|
|
54
|
+
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
|
55
|
+
mode: "demo",
|
|
56
|
+
lineNumbers: true,
|
|
57
|
+
lineWrapping: true
|
|
58
|
+
});
|
|
59
|
+
</script>
|
|
60
|
+
|
|
61
|
+
<p>Demonstration of a multiplexing mode, which, at certain
|
|
62
|
+
boundary strings, switches to one or more inner modes. The out
|
|
63
|
+
(HTML) mode does not get fed the content of the <code><<
|
|
64
|
+
>></code> blocks. See
|
|
65
|
+
the <a href="../doc/manual.html#addon_multiplex">manual</a> and
|
|
66
|
+
the <a href="../addon/mode/multiplex.js">source</a> for more
|
|
67
|
+
information.</p>
|
|
68
|
+
|
|
69
|
+
<p>
|
|
70
|
+
<strong>Parsing/Highlighting Tests:</strong>
|
|
71
|
+
<a href="../test/index.html#multiplexing_*">normal</a>,
|
|
72
|
+
<a href="../test/index.html#verbose,multiplexing_*">verbose</a>.
|
|
73
|
+
</p>
|
|
74
|
+
|
|
75
|
+
</article>
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
|
|
3
|
+
<title>CodeMirror: Overlay Parser Demo</title>
|
|
4
|
+
<meta charset="utf-8"/>
|
|
5
|
+
<link rel=stylesheet href="../doc/docs.css">
|
|
6
|
+
|
|
7
|
+
<link rel="stylesheet" href="../lib/codemirror.css">
|
|
8
|
+
<script src="../lib/codemirror.js"></script>
|
|
9
|
+
<script src="../addon/mode/overlay.js"></script>
|
|
10
|
+
<script src="../mode/xml/xml.js"></script>
|
|
11
|
+
<style type="text/css">
|
|
12
|
+
.CodeMirror {border: 1px solid black;}
|
|
13
|
+
.cm-mustache {color: #0ca;}
|
|
14
|
+
</style>
|
|
15
|
+
<div id=nav>
|
|
16
|
+
<a href="http://codemirror.net"><img id=logo src="../doc/logo.png"></a>
|
|
17
|
+
|
|
18
|
+
<ul>
|
|
19
|
+
<li><a href="../index.html">Home</a>
|
|
20
|
+
<li><a href="../doc/manual.html">Manual</a>
|
|
21
|
+
<li><a href="https://github.com/marijnh/codemirror">Code</a>
|
|
22
|
+
</ul>
|
|
23
|
+
<ul>
|
|
24
|
+
<li><a class=active href="#">Overlay Parser</a>
|
|
25
|
+
</ul>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<article>
|
|
29
|
+
<h2>Overlay Parser Demo</h2>
|
|
30
|
+
<form><textarea id="code" name="code">
|
|
31
|
+
<html>
|
|
32
|
+
<body>
|
|
33
|
+
<h1>{{title}}</h1>
|
|
34
|
+
<p>These are links to {{things}}:</p>
|
|
35
|
+
<ul>{{#links}}
|
|
36
|
+
<li><a href="{{url}}">{{text}}</a></li>
|
|
37
|
+
{{/links}}</ul>
|
|
38
|
+
</body>
|
|
39
|
+
</html>
|
|
40
|
+
</textarea></form>
|
|
41
|
+
|
|
42
|
+
<script>
|
|
43
|
+
CodeMirror.defineMode("mustache", function(config, parserConfig) {
|
|
44
|
+
var mustacheOverlay = {
|
|
45
|
+
token: function(stream, state) {
|
|
46
|
+
var ch;
|
|
47
|
+
if (stream.match("{{")) {
|
|
48
|
+
while ((ch = stream.next()) != null)
|
|
49
|
+
if (ch == "}" && stream.next() == "}") break;
|
|
50
|
+
stream.eat("}");
|
|
51
|
+
return "mustache";
|
|
52
|
+
}
|
|
53
|
+
while (stream.next() != null && !stream.match("{{", false)) {}
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
return CodeMirror.overlayMode(CodeMirror.getMode(config, parserConfig.backdrop || "text/html"), mustacheOverlay);
|
|
58
|
+
});
|
|
59
|
+
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {mode: "mustache"});
|
|
60
|
+
</script>
|
|
61
|
+
|
|
62
|
+
<p>Demonstration of a mode that parses HTML, highlighting
|
|
63
|
+
the <a href="http://mustache.github.com/">Mustache</a> templating
|
|
64
|
+
directives inside of it by using the code
|
|
65
|
+
in <a href="../addon/mode/overlay.js"><code>overlay.js</code></a>. View
|
|
66
|
+
source to see the 15 lines of code needed to accomplish this.</p>
|
|
67
|
+
|
|
68
|
+
</article>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
|
|
3
|
+
<title>CodeMirror: Placeholder demo</title>
|
|
4
|
+
<meta charset="utf-8"/>
|
|
5
|
+
<link rel=stylesheet href="../doc/docs.css">
|
|
6
|
+
|
|
7
|
+
<link rel="stylesheet" href="../lib/codemirror.css">
|
|
8
|
+
<script src="../lib/codemirror.js"></script>
|
|
9
|
+
<script src="../addon/display/placeholder.js"></script>
|
|
10
|
+
<style type="text/css">
|
|
11
|
+
.CodeMirror { border: 1px solid silver; }
|
|
12
|
+
.CodeMirror-empty { outline: 1px solid #c22; }
|
|
13
|
+
.CodeMirror-empty.CodeMirror-focused { outline: none; }
|
|
14
|
+
.CodeMirror pre.CodeMirror-placeholder { color: #999; }
|
|
15
|
+
</style>
|
|
16
|
+
<div id=nav>
|
|
17
|
+
<a href="http://codemirror.net"><img id=logo src="../doc/logo.png"></a>
|
|
18
|
+
|
|
19
|
+
<ul>
|
|
20
|
+
<li><a href="../index.html">Home</a>
|
|
21
|
+
<li><a href="../doc/manual.html">Manual</a>
|
|
22
|
+
<li><a href="https://github.com/marijnh/codemirror">Code</a>
|
|
23
|
+
</ul>
|
|
24
|
+
<ul>
|
|
25
|
+
<li><a class=active href="#">Placeholder</a>
|
|
26
|
+
</ul>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<article>
|
|
30
|
+
<h2>Placeholder demo</h2>
|
|
31
|
+
<form><textarea id="code" name="code" placeholder="Code goes here..."></textarea></form>
|
|
32
|
+
|
|
33
|
+
<p>The <a href="../doc/manual.html#addon_placeholder">placeholder</a>
|
|
34
|
+
plug-in adds an option <code>placeholder</code> that can be set to
|
|
35
|
+
make text appear in the editor when it is empty and not focused.
|
|
36
|
+
If the source textarea has a <code>placeholder</code> attribute,
|
|
37
|
+
it will automatically be inherited.</p>
|
|
38
|
+
|
|
39
|
+
<script>
|
|
40
|
+
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
|
41
|
+
lineNumbers: true
|
|
42
|
+
});
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
</article>
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
|
|
3
|
+
<title>CodeMirror: HTML5 preview</title>
|
|
4
|
+
<meta charset="utf-8"/>
|
|
5
|
+
<link rel=stylesheet href="../doc/docs.css">
|
|
6
|
+
|
|
7
|
+
<link rel=stylesheet href=../lib/codemirror.css>
|
|
8
|
+
<script src=../lib/codemirror.js></script>
|
|
9
|
+
<script src=../mode/xml/xml.js></script>
|
|
10
|
+
<script src=../mode/javascript/javascript.js></script>
|
|
11
|
+
<script src=../mode/css/css.js></script>
|
|
12
|
+
<script src=../mode/htmlmixed/htmlmixed.js></script>
|
|
13
|
+
<style type=text/css>
|
|
14
|
+
.CodeMirror {
|
|
15
|
+
float: left;
|
|
16
|
+
width: 50%;
|
|
17
|
+
border: 1px solid black;
|
|
18
|
+
}
|
|
19
|
+
iframe {
|
|
20
|
+
width: 49%;
|
|
21
|
+
float: left;
|
|
22
|
+
height: 300px;
|
|
23
|
+
border: 1px solid black;
|
|
24
|
+
border-left: 0px;
|
|
25
|
+
}
|
|
26
|
+
</style>
|
|
27
|
+
<div id=nav>
|
|
28
|
+
<a href="http://codemirror.net"><img id=logo src="../doc/logo.png"></a>
|
|
29
|
+
|
|
30
|
+
<ul>
|
|
31
|
+
<li><a href="../index.html">Home</a>
|
|
32
|
+
<li><a href="../doc/manual.html">Manual</a>
|
|
33
|
+
<li><a href="https://github.com/marijnh/codemirror">Code</a>
|
|
34
|
+
</ul>
|
|
35
|
+
<ul>
|
|
36
|
+
<li><a class=active href="#">HTML5 preview</a>
|
|
37
|
+
</ul>
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<article>
|
|
41
|
+
<h2>HTML5 preview</h2>
|
|
42
|
+
|
|
43
|
+
<textarea id=code name=code>
|
|
44
|
+
<!doctype html>
|
|
45
|
+
<html>
|
|
46
|
+
<head>
|
|
47
|
+
<meta charset=utf-8>
|
|
48
|
+
<title>HTML5 canvas demo</title>
|
|
49
|
+
<style>p {font-family: monospace;}</style>
|
|
50
|
+
</head>
|
|
51
|
+
<body>
|
|
52
|
+
<p>Canvas pane goes here:</p>
|
|
53
|
+
<canvas id=pane width=300 height=200></canvas>
|
|
54
|
+
<script>
|
|
55
|
+
var canvas = document.getElementById('pane');
|
|
56
|
+
var context = canvas.getContext('2d');
|
|
57
|
+
|
|
58
|
+
context.fillStyle = 'rgb(250,0,0)';
|
|
59
|
+
context.fillRect(10, 10, 55, 50);
|
|
60
|
+
|
|
61
|
+
context.fillStyle = 'rgba(0, 0, 250, 0.5)';
|
|
62
|
+
context.fillRect(30, 30, 55, 50);
|
|
63
|
+
</script>
|
|
64
|
+
</body>
|
|
65
|
+
</html></textarea>
|
|
66
|
+
<iframe id=preview></iframe>
|
|
67
|
+
<script>
|
|
68
|
+
var delay;
|
|
69
|
+
// Initialize CodeMirror editor with a nice html5 canvas demo.
|
|
70
|
+
var editor = CodeMirror.fromTextArea(document.getElementById('code'), {
|
|
71
|
+
mode: 'text/html',
|
|
72
|
+
tabMode: 'indent'
|
|
73
|
+
});
|
|
74
|
+
editor.on("change", function() {
|
|
75
|
+
clearTimeout(delay);
|
|
76
|
+
delay = setTimeout(updatePreview, 300);
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
function updatePreview() {
|
|
80
|
+
var previewFrame = document.getElementById('preview');
|
|
81
|
+
var preview = previewFrame.contentDocument || previewFrame.contentWindow.document;
|
|
82
|
+
preview.open();
|
|
83
|
+
preview.write(editor.getValue());
|
|
84
|
+
preview.close();
|
|
85
|
+
}
|
|
86
|
+
setTimeout(updatePreview, 300);
|
|
87
|
+
</script>
|
|
88
|
+
</article>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
|
|
3
|
+
<title>CodeMirror: Autoresize Demo</title>
|
|
4
|
+
<meta charset="utf-8"/>
|
|
5
|
+
<link rel=stylesheet href="../doc/docs.css">
|
|
6
|
+
|
|
7
|
+
<link rel="stylesheet" href="../lib/codemirror.css">
|
|
8
|
+
<script src="../lib/codemirror.js"></script>
|
|
9
|
+
<script src="../mode/css/css.js"></script>
|
|
10
|
+
<style type="text/css">
|
|
11
|
+
.CodeMirror {
|
|
12
|
+
border: 1px solid #eee;
|
|
13
|
+
height: auto;
|
|
14
|
+
}
|
|
15
|
+
.CodeMirror-scroll {
|
|
16
|
+
overflow-y: hidden;
|
|
17
|
+
overflow-x: auto;
|
|
18
|
+
}
|
|
19
|
+
</style>
|
|
20
|
+
<div id=nav>
|
|
21
|
+
<a href="http://codemirror.net"><img id=logo src="../doc/logo.png"></a>
|
|
22
|
+
|
|
23
|
+
<ul>
|
|
24
|
+
<li><a href="../index.html">Home</a>
|
|
25
|
+
<li><a href="../doc/manual.html">Manual</a>
|
|
26
|
+
<li><a href="https://github.com/marijnh/codemirror">Code</a>
|
|
27
|
+
</ul>
|
|
28
|
+
<ul>
|
|
29
|
+
<li><a class=active href="#">Autoresize</a>
|
|
30
|
+
</ul>
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
<article>
|
|
34
|
+
<h2>Autoresize Demo</h2>
|
|
35
|
+
<form><textarea id="code" name="code">
|
|
36
|
+
.CodeMirror {
|
|
37
|
+
border: 1px solid #eee;
|
|
38
|
+
height: auto;
|
|
39
|
+
}
|
|
40
|
+
.CodeMirror-scroll {
|
|
41
|
+
overflow-y: hidden;
|
|
42
|
+
overflow-x: auto;
|
|
43
|
+
}
|
|
44
|
+
</textarea></form>
|
|
45
|
+
|
|
46
|
+
<p>By setting a few CSS properties, and giving
|
|
47
|
+
the <a href="../doc/manual.html#option_viewportMargin"><code>viewportMargin</code></a>
|
|
48
|
+
a value of <code>Infinity</code>, CodeMirror can be made to
|
|
49
|
+
automatically resize to fit its content.</p>
|
|
50
|
+
|
|
51
|
+
<script>
|
|
52
|
+
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
|
53
|
+
lineNumbers: true,
|
|
54
|
+
viewportMargin: Infinity
|
|
55
|
+
});
|
|
56
|
+
</script>
|
|
57
|
+
|
|
58
|
+
</article>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
|
|
3
|
+
<title>CodeMirror: Mode Runner Demo</title>
|
|
4
|
+
<meta charset="utf-8"/>
|
|
5
|
+
<link rel=stylesheet href="../doc/docs.css">
|
|
6
|
+
|
|
7
|
+
<link rel="stylesheet" href="../lib/codemirror.css">
|
|
8
|
+
<script src="../lib/codemirror.js"></script>
|
|
9
|
+
<script src="../addon/runmode/runmode.js"></script>
|
|
10
|
+
<script src="../mode/xml/xml.js"></script>
|
|
11
|
+
<div id=nav>
|
|
12
|
+
<a href="http://codemirror.net"><img id=logo src="../doc/logo.png"></a>
|
|
13
|
+
|
|
14
|
+
<ul>
|
|
15
|
+
<li><a href="../index.html">Home</a>
|
|
16
|
+
<li><a href="../doc/manual.html">Manual</a>
|
|
17
|
+
<li><a href="https://github.com/marijnh/codemirror">Code</a>
|
|
18
|
+
</ul>
|
|
19
|
+
<ul>
|
|
20
|
+
<li><a class=active href="#">Mode Runner</a>
|
|
21
|
+
</ul>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<article>
|
|
25
|
+
<h2>Mode Runner Demo</h2>
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
<textarea id="code" style="width: 90%; height: 7em; border: 1px solid black; padding: .2em .4em;">
|
|
29
|
+
<foobar>
|
|
30
|
+
<blah>Enter your xml here and press the button below to display
|
|
31
|
+
it as highlighted by the CodeMirror XML mode</blah>
|
|
32
|
+
<tag2 foo="2" bar="&quot;bar&quot;"/>
|
|
33
|
+
</foobar></textarea><br>
|
|
34
|
+
<button onclick="doHighlight();">Highlight!</button>
|
|
35
|
+
<pre id="output" class="cm-s-default"></pre>
|
|
36
|
+
|
|
37
|
+
<script>
|
|
38
|
+
function doHighlight() {
|
|
39
|
+
CodeMirror.runMode(document.getElementById("code").value, "application/xml",
|
|
40
|
+
document.getElementById("output"));
|
|
41
|
+
}
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<p>Running a CodeMirror mode outside of the editor.
|
|
45
|
+
The <code>CodeMirror.runMode</code> function, defined
|
|
46
|
+
in <code><a href="../addon/runmode/runmode.js">lib/runmode.js</a></code> takes the following arguments:</p>
|
|
47
|
+
|
|
48
|
+
<dl>
|
|
49
|
+
<dt><code>text (string)</code></dt>
|
|
50
|
+
<dd>The document to run through the highlighter.</dd>
|
|
51
|
+
<dt><code>mode (<a href="../doc/manual.html#option_mode">mode spec</a>)</code></dt>
|
|
52
|
+
<dd>The mode to use (must be loaded as normal).</dd>
|
|
53
|
+
<dt><code>output (function or DOM node)</code></dt>
|
|
54
|
+
<dd>If this is a function, it will be called for each token with
|
|
55
|
+
two arguments, the token's text and the token's style class (may
|
|
56
|
+
be <code>null</code> for unstyled tokens). If it is a DOM node,
|
|
57
|
+
the tokens will be converted to <code>span</code> elements as in
|
|
58
|
+
an editor, and inserted into the node
|
|
59
|
+
(through <code>innerHTML</code>).</dd>
|
|
60
|
+
</dl>
|
|
61
|
+
|
|
62
|
+
</article>
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
|
|
3
|
+
<title>CodeMirror: Search/Replace Demo</title>
|
|
4
|
+
<meta charset="utf-8"/>
|
|
5
|
+
<link rel=stylesheet href="../doc/docs.css">
|
|
6
|
+
|
|
7
|
+
<link rel="stylesheet" href="../lib/codemirror.css">
|
|
8
|
+
<link rel="stylesheet" href="../addon/dialog/dialog.css">
|
|
9
|
+
<script src="../lib/codemirror.js"></script>
|
|
10
|
+
<script src="../mode/xml/xml.js"></script>
|
|
11
|
+
<script src="../addon/dialog/dialog.js"></script>
|
|
12
|
+
<script src="../addon/search/searchcursor.js"></script>
|
|
13
|
+
<script src="../addon/search/search.js"></script>
|
|
14
|
+
<style type="text/css">
|
|
15
|
+
.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}
|
|
16
|
+
dt {font-family: monospace; color: #666;}
|
|
17
|
+
</style>
|
|
18
|
+
<div id=nav>
|
|
19
|
+
<a href="http://codemirror.net"><img id=logo src="../doc/logo.png"></a>
|
|
20
|
+
|
|
21
|
+
<ul>
|
|
22
|
+
<li><a href="../index.html">Home</a>
|
|
23
|
+
<li><a href="../doc/manual.html">Manual</a>
|
|
24
|
+
<li><a href="https://github.com/marijnh/codemirror">Code</a>
|
|
25
|
+
</ul>
|
|
26
|
+
<ul>
|
|
27
|
+
<li><a class=active href="#">Search/Replace</a>
|
|
28
|
+
</ul>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<article>
|
|
32
|
+
<h2>Search/Replace Demo</h2>
|
|
33
|
+
<form><textarea id="code" name="code">
|
|
34
|
+
<dt id="option_indentWithTabs"><code>indentWithTabs (boolean)</code></dt>
|
|
35
|
+
<dd>Whether, when indenting, the first N*8 spaces should be
|
|
36
|
+
replaced by N tabs. Default is false.</dd>
|
|
37
|
+
|
|
38
|
+
<dt id="option_tabMode"><code>tabMode (string)</code></dt>
|
|
39
|
+
<dd>Determines what happens when the user presses the tab key.
|
|
40
|
+
Must be one of the following:
|
|
41
|
+
<dl>
|
|
42
|
+
<dt><code>"classic" (the default)</code></dt>
|
|
43
|
+
<dd>When nothing is selected, insert a tab. Otherwise,
|
|
44
|
+
behave like the <code>"shift"</code> mode. (When shift is
|
|
45
|
+
held, this behaves like the <code>"indent"</code> mode.)</dd>
|
|
46
|
+
<dt><code>"shift"</code></dt>
|
|
47
|
+
<dd>Indent all selected lines by
|
|
48
|
+
one <a href="#option_indentUnit"><code>indentUnit</code></a>.
|
|
49
|
+
If shift was held while pressing tab, un-indent all selected
|
|
50
|
+
lines one unit.</dd>
|
|
51
|
+
<dt><code>"indent"</code></dt>
|
|
52
|
+
<dd>Indent the line the 'correctly', based on its syntactic
|
|
53
|
+
context. Only works if the
|
|
54
|
+
mode <a href="#indent">supports</a> it.</dd>
|
|
55
|
+
<dt><code>"default"</code></dt>
|
|
56
|
+
<dd>Do not capture tab presses, let the browser apply its
|
|
57
|
+
default behaviour (which usually means it skips to the next
|
|
58
|
+
control).</dd>
|
|
59
|
+
</dl></dd>
|
|
60
|
+
|
|
61
|
+
<dt id="option_enterMode"><code>enterMode (string)</code></dt>
|
|
62
|
+
<dd>Determines whether and how new lines are indented when the
|
|
63
|
+
enter key is pressed. The following modes are supported:
|
|
64
|
+
<dl>
|
|
65
|
+
<dt><code>"indent" (the default)</code></dt>
|
|
66
|
+
<dd>Use the mode's indentation rules to give the new line
|
|
67
|
+
the correct indentation.</dd>
|
|
68
|
+
<dt><code>"keep"</code></dt>
|
|
69
|
+
<dd>Indent the line the same as the previous line.</dd>
|
|
70
|
+
<dt><code>"flat"</code></dt>
|
|
71
|
+
<dd>Do not indent the new line.</dd>
|
|
72
|
+
</dl></dd>
|
|
73
|
+
</textarea></form>
|
|
74
|
+
|
|
75
|
+
<script>
|
|
76
|
+
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {mode: "text/html", lineNumbers: true});
|
|
77
|
+
</script>
|
|
78
|
+
|
|
79
|
+
<p>Demonstration of primitive search/replace functionality. The
|
|
80
|
+
keybindings (which can be overridden by custom keymaps) are:</p>
|
|
81
|
+
<dl>
|
|
82
|
+
<dt>Ctrl-F / Cmd-F</dt><dd>Start searching</dd>
|
|
83
|
+
<dt>Ctrl-G / Cmd-G</dt><dd>Find next</dd>
|
|
84
|
+
<dt>Shift-Ctrl-G / Shift-Cmd-G</dt><dd>Find previous</dd>
|
|
85
|
+
<dt>Shift-Ctrl-F / Cmd-Option-F</dt><dd>Replace</dd>
|
|
86
|
+
<dt>Shift-Ctrl-R / Shift-Cmd-Option-F</dt><dd>Replace all</dd>
|
|
87
|
+
</dl>
|
|
88
|
+
<p>Searching is enabled by
|
|
89
|
+
including <a href="../addon/search/search.js">addon/search/search.js</a>
|
|
90
|
+
and <a href="../addon/search/searchcursor.js">addon/search/searchcursor.js</a>.
|
|
91
|
+
For good-looking input dialogs, you also want to include
|
|
92
|
+
<a href="../addon/dialog/dialog.js">addon/dialog/dialog.js</a>
|
|
93
|
+
and <a href="../addon/dialog/dialog.css">addon/dialog/dialog.css</a>.</p>
|
|
94
|
+
</article>
|