CodeMirror中的“应用程序/ ld + json”模式未正确显示json格式

时间:2019-02-13 09:09:34

标签: codemirror-modes

我想以json格式显示文本,但未通过使用'application / ld + json'模式显示

以下是我的代码:_

var editor = CodeMirror.fromTextArea(document.getElementById(id), {
  mode:'application/ld+json',
  theme: 'eclipse',
  matchBrackets :'true',
  lineNumbers : 'true',
  lineWrapping : 'true',
  autoCloseBrackets: 'true'
});
editor.on('inputRead', function (a, b) {
  editor.save();            
});
editor.on('onInput', function (a, b) {
  editor.save();            
});

enter image description here

0 个答案:

没有答案