├── .gitignore ├── .jshintrc ├── ChangeLog ├── README.md ├── build.js ├── dist ├── example │ ├── codemirror │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── bin │ │ │ └── compress │ │ ├── demo │ │ │ ├── activeline.html │ │ │ ├── changemode.html │ │ │ ├── closetag.html │ │ │ ├── complete.html │ │ │ ├── emacs.html │ │ │ ├── folding.html │ │ │ ├── formatting.html │ │ │ ├── fullscreen.html │ │ │ ├── loadmode.html │ │ │ ├── marker.html │ │ │ ├── matchhighlighter.html │ │ │ ├── multiplex.html │ │ │ ├── mustache.html │ │ │ ├── preview.html │ │ │ ├── resize.html │ │ │ ├── runmode.html │ │ │ ├── search.html │ │ │ ├── theme.html │ │ │ ├── vim.html │ │ │ ├── visibletabs.html │ │ │ └── xmlcomplete.html │ │ ├── doc │ │ │ ├── baboon.png │ │ │ ├── baboon_vector.svg │ │ │ ├── compress.html │ │ │ ├── docs.css │ │ │ ├── internals.html │ │ │ ├── manual.html │ │ │ ├── oldrelease.html │ │ │ ├── realworld.html │ │ │ ├── reporting.html │ │ │ └── upgrade_v2.2.html │ │ ├── index.html │ │ ├── keymap │ │ │ ├── emacs.js │ │ │ └── vim.js │ │ ├── lib │ │ │ ├── codemirror.css │ │ │ ├── codemirror.js │ │ │ └── util │ │ │ │ ├── closetag.js │ │ │ │ ├── continuecomment.js │ │ │ │ ├── dialog.css │ │ │ │ ├── dialog.js │ │ │ │ ├── foldcode.js │ │ │ │ ├── formatting.js │ │ │ │ ├── javascript-hint.js │ │ │ │ ├── loadmode.js │ │ │ │ ├── match-highlighter.js │ │ │ │ ├── multiplex.js │ │ │ │ ├── overlay.js │ │ │ │ ├── pig-hint.js │ │ │ │ ├── runmode-standalone.js │ │ │ │ ├── runmode.js │ │ │ │ ├── search.js │ │ │ │ ├── searchcursor.js │ │ │ │ ├── simple-hint.css │ │ │ │ ├── simple-hint.js │ │ │ │ └── xml-hint.js │ │ ├── mode │ │ │ ├── clike │ │ │ │ ├── clike.js │ │ │ │ ├── index.html │ │ │ │ └── scala.html │ │ │ ├── clojure │ │ │ │ ├── clojure.js │ │ │ │ └── index.html │ │ │ ├── coffeescript │ │ │ │ ├── LICENSE │ │ │ │ ├── coffeescript.js │ │ │ │ └── index.html │ │ │ ├── commonlisp │ │ │ │ ├── commonlisp.js │ │ │ │ └── index.html │ │ │ ├── css │ │ │ │ ├── css.js │ │ │ │ ├── index.html │ │ │ │ └── test.js │ │ │ ├── diff │ │ │ │ ├── diff.js │ │ │ │ └── index.html │ │ │ ├── ecl │ │ │ │ ├── ecl.js │ │ │ │ └── index.html │ │ │ ├── erlang │ │ │ │ ├── erlang.js │ │ │ │ └── index.html │ │ │ ├── gfm │ │ │ │ ├── gfm.js │ │ │ │ ├── index.html │ │ │ │ └── test.js │ │ │ ├── go │ │ │ │ ├── go.js │ │ │ │ └── index.html │ │ │ ├── groovy │ │ │ │ ├── groovy.js │ │ │ │ └── index.html │ │ │ ├── haskell │ │ │ │ ├── haskell.js │ │ │ │ └── index.html │ │ │ ├── haxe │ │ │ │ ├── haxe.js │ │ │ │ └── index.html │ │ │ ├── htmlembedded │ │ │ │ ├── htmlembedded.js │ │ │ │ └── index.html │ │ │ ├── htmlmixed │ │ │ │ ├── htmlmixed.js │ │ │ │ └── index.html │ │ │ ├── javascript │ │ │ │ ├── index.html │ │ │ │ ├── javascript.js │ │ │ │ └── typescript.html │ │ │ ├── jinja2 │ │ │ │ ├── index.html │ │ │ │ └── jinja2.js │ │ │ ├── less │ │ │ │ ├── index.html │ │ │ │ └── less.js │ │ │ ├── lua │ │ │ │ ├── index.html │ │ │ │ └── lua.js │ │ │ ├── markdown │ │ │ │ ├── index.html │ │ │ │ ├── markdown.js │ │ │ │ └── test.js │ │ │ ├── mysql │ │ │ │ ├── index.html │ │ │ │ └── mysql.js │ │ │ ├── ntriples │ │ │ │ ├── index.html │ │ │ │ └── ntriples.js │ │ │ ├── ocaml │ │ │ │ ├── index.html │ │ │ │ └── ocaml.js │ │ │ ├── pascal │ │ │ │ ├── LICENSE │ │ │ │ ├── index.html │ │ │ │ └── pascal.js │ │ │ ├── perl │ │ │ │ ├── LICENSE │ │ │ │ ├── index.html │ │ │ │ └── perl.js │ │ │ ├── php │ │ │ │ ├── index.html │ │ │ │ └── php.js │ │ │ ├── pig │ │ │ │ ├── index.html │ │ │ │ └── pig.js │ │ │ ├── plsql │ │ │ │ ├── index.html │ │ │ │ └── plsql.js │ │ │ ├── properties │ │ │ │ ├── index.html │ │ │ │ └── properties.js │ │ │ ├── python │ │ │ │ ├── LICENSE.txt │ │ │ │ ├── index.html │ │ │ │ └── python.js │ │ │ ├── r │ │ │ │ ├── LICENSE │ │ │ │ ├── index.html │ │ │ │ └── r.js │ │ │ ├── rpm │ │ │ │ ├── changes │ │ │ │ │ ├── changes.js │ │ │ │ │ └── index.html │ │ │ │ └── spec │ │ │ │ │ ├── index.html │ │ │ │ │ ├── spec.css │ │ │ │ │ └── spec.js │ │ │ ├── rst │ │ │ │ ├── index.html │ │ │ │ └── rst.js │ │ │ ├── ruby │ │ │ │ ├── LICENSE │ │ │ │ ├── index.html │ │ │ │ └── ruby.js │ │ │ ├── rust │ │ │ │ ├── index.html │ │ │ │ └── rust.js │ │ │ ├── scheme │ │ │ │ ├── index.html │ │ │ │ └── scheme.js │ │ │ ├── shell │ │ │ │ ├── index.html │ │ │ │ └── shell.js │ │ │ ├── sieve │ │ │ │ ├── LICENSE │ │ │ │ ├── index.html │ │ │ │ └── sieve.js │ │ │ ├── smalltalk │ │ │ │ ├── index.html │ │ │ │ └── smalltalk.js │ │ │ ├── smarty │ │ │ │ ├── index.html │ │ │ │ └── smarty.js │ │ │ ├── sparql │ │ │ │ ├── index.html │ │ │ │ └── sparql.js │ │ │ ├── stex │ │ │ │ ├── index.html │ │ │ │ ├── stex.js │ │ │ │ └── test.js │ │ │ ├── tiddlywiki │ │ │ │ ├── index.html │ │ │ │ ├── tiddlywiki.css │ │ │ │ └── tiddlywiki.js │ │ │ ├── tiki │ │ │ │ ├── index.html │ │ │ │ ├── tiki.css │ │ │ │ └── tiki.js │ │ │ ├── vb │ │ │ │ ├── LICENSE.txt │ │ │ │ ├── index.html │ │ │ │ └── vb.js │ │ │ ├── vbscript │ │ │ │ ├── index.html │ │ │ │ └── vbscript.js │ │ │ ├── velocity │ │ │ │ ├── index.html │ │ │ │ └── velocity.js │ │ │ ├── verilog │ │ │ │ ├── index.html │ │ │ │ └── verilog.js │ │ │ ├── xml │ │ │ │ ├── index.html │ │ │ │ └── xml.js │ │ │ ├── xquery │ │ │ │ ├── LICENSE │ │ │ │ ├── index.html │ │ │ │ ├── test │ │ │ │ │ ├── index.html │ │ │ │ │ ├── testBase.js │ │ │ │ │ ├── testEmptySequenceKeyword.js │ │ │ │ │ ├── testMultiAttr.js │ │ │ │ │ ├── testNamespaces.js │ │ │ │ │ ├── testProcessingInstructions.js │ │ │ │ │ └── testQuotes.js │ │ │ │ └── xquery.js │ │ │ ├── yaml │ │ │ │ ├── index.html │ │ │ │ └── yaml.js │ │ │ └── z80 │ │ │ │ ├── index.html │ │ │ │ └── z80.js │ │ ├── package.json │ │ ├── test │ │ │ ├── driver.js │ │ │ ├── index.html │ │ │ ├── lint │ │ │ │ ├── lint.js │ │ │ │ └── parse-js.js │ │ │ ├── mode_test.css │ │ │ ├── mode_test.js │ │ │ ├── phantom_driver.js │ │ │ ├── run.js │ │ │ └── test.js │ │ └── theme │ │ │ ├── ambiance-mobile.css │ │ │ ├── ambiance.css │ │ │ ├── blackboard.css │ │ │ ├── cobalt.css │ │ │ ├── eclipse.css │ │ │ ├── elegant.css │ │ │ ├── erlang-dark.css │ │ │ ├── lesser-dark.css │ │ │ ├── monokai.css │ │ │ ├── neat.css │ │ │ ├── night.css │ │ │ ├── rubyblue.css │ │ │ ├── twilight.css │ │ │ ├── vibrant-ink.css │ │ │ └── xq-dark.css │ ├── example.js │ ├── index.html │ └── server.js ├── secure │ ├── index.html │ └── runner.js └── stuff.min.js ├── lib └── stuff.js ├── package.json ├── secure ├── index.html └── runner.js ├── server.js ├── test ├── .jshintrc ├── mocha.css ├── mocha.js ├── test.js └── tests.html └── vendor ├── assert.js ├── codemirror.css └── codemirror.js /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | node_modules/** -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { "eqeqeq": true 2 | , "latedef": true 3 | , "newcap": true 4 | , "noarg": true 5 | , "sub": true 6 | , "undef": true 7 | , "boss": true 8 | , "eqnull": true 9 | , "browser": true 10 | , "laxcomma": true 11 | , "laxbreak": true 12 | , "strict": true 13 | , "evil": true 14 | , "unused": true 15 | , "predef": { 16 | "define": false 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /ChangeLog: -------------------------------------------------------------------------------- 1 | 3/30/2013, v0.3.0 2 | 3 | * Implemented iframe sandbox. 4 | -------------------------------------------------------------------------------- /build.js: -------------------------------------------------------------------------------- 1 | var ugl = require("uglify-js") 2 | , fs = require('fs'); 3 | 4 | 5 | fs.writeFileSync('dist/stuff.min.js', ugl.minify('lib/stuff.js').code); 6 | fs.writeFileSync('dist/secure/runner.js', ugl.minify('secure/runner.js').code); 7 | fs.writeFileSync('dist/secure/index.html', fs.readFileSync('secure/index.html')); -------------------------------------------------------------------------------- /dist/example/codemirror/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /npm-debug.log -------------------------------------------------------------------------------- /dist/example/codemirror/.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 0.8 4 | -------------------------------------------------------------------------------- /dist/example/codemirror/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2012 by Marijn Haverbeke 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | 21 | Please note that some subdirectories of the CodeMirror distribution 22 | include their own LICENSE files, and are released under different 23 | licences. 24 | -------------------------------------------------------------------------------- /dist/example/codemirror/README.md: -------------------------------------------------------------------------------- 1 | # CodeMirror [![Build Status](https://secure.travis-ci.org/marijnh/CodeMirror.png?branch=master)](http://travis-ci.org/marijnh/CodeMirror) 2 | 3 | CodeMirror is a JavaScript component that provides a code editor in 4 | the browser. When a mode is available for the language you are coding 5 | in, it will color your code, and optionally help with indentation. 6 | 7 | The project page is http://codemirror.net 8 | The manual is at http://codemirror.net/doc/manual.html 9 | -------------------------------------------------------------------------------- /dist/example/codemirror/bin/compress: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | // Compression helper for CodeMirror 4 | // 5 | // Example: 6 | // 7 | // bin/compress codemirror runmode javascript xml 8 | // 9 | // Will take lib/codemirror.js, lib/util/runmode.js, 10 | // mode/javascript/javascript.js, and mode/xml/xml.js, run them though 11 | // the online minifier at http://marijnhaverbeke.nl/uglifyjs, and spit 12 | // out the result. 13 | // 14 | // bin/compress codemirror --local /path/to/bin/UglifyJS 15 | // 16 | // Will use a local minifier instead of the online default one. 17 | // 18 | // Script files are specified without .js ending. Prefixing them with 19 | // their full (local) path is optional. So you may say lib/codemirror 20 | // or mode/xml/xml to be more precise. In fact, even the .js suffix 21 | // may be speficied, if wanted. 22 | 23 | "use strict"; 24 | 25 | var fs = require("fs"); 26 | 27 | function help(ok) { 28 | console.log("usage: " + process.argv[1] + " [--local /path/to/uglifyjs] files..."); 29 | process.exit(ok ? 0 : 1); 30 | } 31 | 32 | var local = null, args = null, files = [], blob = ""; 33 | 34 | for (var i = 2; i < process.argv.length; ++i) { 35 | var arg = process.argv[i]; 36 | if (arg == "--local" && i + 1 < process.argv.length) { 37 | var parts = process.argv[++i].split(/\s+/); 38 | local = parts[0]; 39 | args = parts.slice(1); 40 | } else if (arg == "--help") { 41 | help(true); 42 | } else if (arg[0] != "-") { 43 | files.push({name: arg, re: new RegExp("(?:\\/|^)" + arg + (/\.js$/.test(arg) ? "$" : "\\.js$"))}); 44 | } else help(false); 45 | } 46 | 47 | function walk(dir) { 48 | fs.readdirSync(dir).forEach(function(fname) { 49 | if (/^[_\.]/.test(fname)) return; 50 | var file = dir + fname; 51 | if (fs.statSync(file).isDirectory()) return walk(file + "/"); 52 | if (files.some(function(spec, i) { 53 | var match = spec.re.test(file); 54 | if (match) files.splice(i, 1); 55 | return match; 56 | })) { 57 | if (local) args.push(file); 58 | else blob += fs.readFileSync(file, "utf8"); 59 | } 60 | }); 61 | } 62 | 63 | walk("lib/"); 64 | walk("mode/"); 65 | 66 | if (files.length) { 67 | console.log("Some speficied files were not found: " + 68 | files.map(function(a){return a.name;}).join(", ")); 69 | process.exit(1); 70 | } 71 | 72 | if (local) { 73 | require("child_process").spawn(local, args, {stdio: ["ignore", process.stdout, process.stderr]}); 74 | } else { 75 | var data = new Buffer("js_code=" + require("querystring").escape(blob), "utf8"); 76 | var req = require("http").request({ 77 | host: "marijnhaverbeke.nl", 78 | port: 80, 79 | method: "POST", 80 | path: "/uglifyjs", 81 | headers: {"content-type": "application/x-www-form-urlencoded", 82 | "content-length": data.length} 83 | }); 84 | req.on("response", function(resp) { 85 | resp.on("data", function (chunk) { process.stdout.write(chunk); }); 86 | }); 87 | req.end(data); 88 | } 89 | -------------------------------------------------------------------------------- /dist/example/codemirror/demo/activeline.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Active Line Demo 6 | 7 | 8 | 9 | 10 | 11 | 15 | 16 | 17 |

CodeMirror: Active Line Demo

18 | 19 |
56 | 57 | 69 | 70 |

Styling the current cursor line.

71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /dist/example/codemirror/demo/changemode.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Mode-Changing Demo 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 |

CodeMirror: Mode-Changing demo

18 | 19 |
26 | 27 |

On changes to the content of the above editor, a (crude) script 28 | tries to auto-detect the language used, and switches the editor to 29 | either JavaScript or Scheme mode based on that.

30 | 31 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /dist/example/codemirror/demo/closetag.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CodeMirror: Close-Tag Demo 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 17 | 18 | 19 | 20 |

Close-Tag Demo

21 |