Has anyone attempted to utilize Code Mirror through browserify?
I can't see anything on the screen, even though all the HTML tags have been generated.
The code snippet is as follows:
var CodeMirror = require('codemirror');
require('codemirror/mode/javascript/javascript.js');
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
lineNumbers: true,
extraKeys: {
"Ctrl-Space": "autocomplete"
},
mode: {
name: "javascript",
globalVars: true
}
});
I am wondering how I should include the JavaScript mode properly.