.CodeMirror {border-top: 1px solid #888; border-bottom: 1px solid #888;}
CodeMirror
Home Manual Code
Closebrackets
Closebrackets Demo
function Grid(width, height) { this.width = width; this.height = height; this.cells = new Array(width * height); } Grid.prototype.valueAt = function(point) { return this.cells[point.y * this.width + point.x]; }; Grid.prototype.setValueAt = function(point, value) { this.cells[point.y * this.width + point.x] = value; }; Grid.prototype.isInside = function(point) { return point.x >= 0 && point.y >= 0 && point.x
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {autoCloseBrackets: true});