forked from emmetio/codemirror
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
52 lines (48 loc) · 1.3 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!doctype html>
<html>
<head>
<title>Emmet for CodeMirror 4</title>
<link rel="stylesheet" href="./node_modules/codemirror/lib/codemirror.css" />
<script src="./node_modules/codemirror/lib/codemirror.js"></script>
<script src="./node_modules/codemirror/mode/xml/xml.js"></script>
<script src="./node_modules/codemirror/mode/css/css.js"></script>
<script src="./node_modules/codemirror/mode/htmlmixed/htmlmixed.js"></script>
<script src="./dist/emmet.js"></script>
<style>
.CodeMirror {
border: 1px solid black;
}
.cm-delimit {
color: #fa4;
}
</style>
</head>
<body>
<h1>Emmet for CodeMirror 4</h1>
<form><textarea id="code" name="code">
<html style="color: green">
<!-- this is a comment -->
<head>
<title>HTML Example</title>
<style>
body {
padding: 10px;
}
</style>
</head>
<body>
The indentation tries to be <em>somewhat &quot;do what
I mean&quot;</em>... but might not match your style.
</body>
</html>
</textarea></form>
<script>
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
mode : "text/html",
lineNumbers : true,
profile: 'xhtml' /* define Emmet output profile */
});
emmetCodeMirror(editor);
</script>
</body>
</html>