javascript - 代码镜像。 htmlmixed 模式下的 lint

标签 javascript html codemirror

我用这样的参数创建一个文本区域:

{
  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/

相关文章:

ios - 如何支持带有蓝牙键盘的 UIWebView 上的箭头键?

css - 代码镜像光标位置偏移

Javascript:如何从 div 或字符串中删除最后一个字符?

javascript - 我们如何在 angular2 typescript 中获得地理位置?

html - 需要通过 css 在事件选项卡上使用相同的下划线,就像在悬停选项卡上一样

html - 具有动态高度的居中灯箱

css - 像 Ms Word 一样使用 HTML 或 CSS 设置缩进样式

javascript - 使用带有 Javascript 的 Mailgun 发送电子邮件

php - Javascript不会拉取php变量吗?

javascript - 使用 CSS 显示 :flex (flexbox) and/or JavaScript to make adjustable page