CodeMirror-格式化HTML自动关闭标签吗?

时间:2019-10-14 05:36:21

标签: html xml codemirror

当我使用不需要结束标记的标记(例如,label,col,input,...)时,它看起来像是一个错误。
像这样:

enter image description here 我需要做些什么配置才能使标签看起来很漂亮,而无需关闭标签?
选项设置如下:

var editor = CodeMirror.fromTextArea(options.target, {
   mode : 'xml',
   matchClosing: false,
   theme: options.theme || 'default',
   readOnly: options.readOnly,
   lineNumbers: options.lineNumbers,
   extraKeys: {"Ctrl-Space": "autocomplete"}
});

0 个答案:

没有答案