.CodeMirror {border: 1px solid black;}
CodeMirror
Home Manual Code
Linter
Linter Demo
var widgets = [] function updateHints() { editor.operation(function(){ for (var i = 0; i
[ { _id: "post 1", "author": "Bob", "content": "...", "page_views": 5 }, { "_id": "post 2", "author": "Bob", "content": "...", "page_views": 9 }, { "_id": "post 3", "author": "Bob", "content": "...", "page_views": 8 } ]
@charset "UTF-8";
@import url("booya.css") print, screen; @import "whatup.css" screen; @import "wicked.css";
/*Error*/ @charset "UTF-8";
@namespace "http://www.w3.org/1999/xhtml"; @namespace svg "http://www.w3.org/2000/svg";
/*Warning: empty ruleset */ .foo { }
h1 { font-weight: bold; }
/*Warning: qualified heading */ .foo h1 { font-weight: bold; }
/*Warning: adjoining classes */ .foo.bar { zoom: 1; }
li.inline { width: 100%; /*Warning: 100% can be problematic*/ }
li.last { display: inline; padding-left: 3px !important; padding-right: 3px; border-right: 0px; }
@media print { li.inline { color: black; } }
@page { margin: 10%; counter-increment: page;
@top-center { font-family: sans-serif; font-weight: bold; font-size: 2em; content: counter(page); } }
var editor = CodeMirror.fromTextArea(document.getElementById("code-js"), { lineNumbers: true, mode: "javascript", gutters: ["CodeMirror-lint-markers"], lint: true });
var editor_json = CodeMirror.fromTextArea(document.getElementById("code-json"), { lineNumbers: true, mode: "application/json", gutters: ["CodeMirror-lint-markers"], lint: true });
var editor_css = CodeMirror.fromTextArea(document.getElementById("code-css"), { lineNumbers: true, mode: "css", gutters: ["CodeMirror-lint-markers"], lint: true });