Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

index.haml

(index.haml)

%script(src="https://codemirror.net/lib/codemirror.js")
%script(src="https://unpkg.com/jsonlint@1.6.3/web/jsonlint.js")
%script(src="https://codemirror.net/addon/lint/lint.js")
%script(src="https://codemirror.net/addon/lint/json-lint.js")
%link(src="https://codemirror.net/lib/codemirror.css")
%link(src="https://codemirror.net/addon/lint/lint.css")
%script(src="https://codemirror.net/mode/javascript/javascript.js")
%script(src="https://codemirror.net/mode/css/css.js")
%script(src="https://codemirror.net/")
%script(src="https://codemirror.net/")

%testarea#json

index.coffee

(索引咖啡)

editor = CodeMirror.fromTextArea(document.getElementById('json'),
      lineNumbers: true
      mode: "application/json"
      lint: true
      gutters: ["CodeMirror-lint-markers"]
    )

No warnings shown on the page.

(页面上没有显示警告。)

在此处输入图片说明

How could I make it work?

(我该如何运作?)

I implemented this referencing the official doc and demo.

(我参考了官方文档和演示来实现了这一点。)

  ask by masa_ekohe translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
295 views
Welcome To Ask or Share your Answers For Others

1 Answer

等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...