我正在使用FirePad为自己创建各种 IDE。我正在尝试做的是使用示例/中的 userlist.html 来呈现 JS 代码。这是在examples/code.html中完成的,我已经改变了:
var codeMirror = CodeMirror(document.getElementById('firepad'), { lineWrapping: true });
到
var codeMirror = CodeMirror(document.getElementById('firepad'), {
lineNumbers: true,
mode: 'javascript'
});
它确实显示了行号,但它没有突出显示 JS。
为了澄清,我在 examples/userlist.html 中进行了这些更改