Skip to content

Commit 56da438

Browse files
save file
1 parent 032b7ea commit 56da438

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<title>CodeMirror 5</title>
6+
7+
<link href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.2.0/codemirror.min.css" rel="stylesheet">
8+
<style>
9+
#editor {
10+
border: 1px solid #ccc;
11+
height: 300px;
12+
}
13+
</style>
14+
</head>
15+
16+
<body>
17+
<h2>CodeMirror 6 Editor</h2>
18+
<div id="editor">
19+
</div>
20+
21+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.2.0/codemirror.min.js"></script>
22+
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.2.0/mode/javascript/javascript.min.js"></script>
23+
24+
25+
<script>
26+
console.clear();
27+
28+
var myCodeMirror = CodeMirror(editor,{
29+
30+
value: "function myScript(){return 100;}\n",
31+
mode: "javascript",
32+
lineNumbers: true,
33+
});
34+
35+
36+
37+
</script>
38+
</body>
39+
</html>

0 commit comments

Comments
 (0)