我用这样的参数创建一个文本区域:
{
lineNumbers: true,
dragDrop: true,
mode: "htmlmixed",
theme: 'bespin',
autoCloseBrackets: true,
autoCloseTags: true,
matchBrackets: {
afterCursor: true,
maxScanLines: 10000,
maxScanLineLength: 100000
},
foldGutter: true,
gutters: ["CodeMirror-lint-markers", "CodeMirror-linenumbers", "CodeMirror-foldgutter"],
lint: true,
matchTags: {
bothTags: true
}
}
但分析仅针对html。
是否可以让 linter 分析 html、css 和 js?
最佳答案
您可以添加插件 htmlmixed-lint.js来自基于 Codemiror 的协作编辑器 codepad .
关于javascript - 代码镜像。 htmlmixed 模式下的 lint,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52057488/