-
Notifications
You must be signed in to change notification settings - Fork 1
/
statsicform.html
59 lines (51 loc) · 2.28 KB
/
statsicform.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
53
54
55
56
57
58
59
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link href="https://cdn.quilljs.com/1.3.6/quill.snow.css" rel="stylesheet">
<link rel="stylesheet" href="codemirror-5.65.16/lib/codemirror.css">
<link rel="stylesheet" href="codemirror-5.65.16/lib/codemirror.css">
<script src="codemirror-5.65.16/mode/python/python.js"></script>
<script src="codemirror-5.65.16/lib/codemirror.js"></script>
<script src="codemirror-5.65.16/mode/clike/clike.js"></script>
<link rel="stylesheet" href="codemirror-5.65.16/theme/dracula.css">
<script src="codemirror-5.65.16/addon/edit/closebrackets.js"></script>
<link rel="icon" type="image/png" href="logo/fav.jpeg">
</head>
<body>
<form action="/submit" method="post" id="section-form">
<label for="sectionName">lanuage Name:</label>
<input type="text" id="lanname" name="lanname" required>
<label for="sectionName">Section Name:</label>
<input type="text" id="sectionName" name="sectionName" required>
<label for="sectionDescription">Section Description:</label>
<div id="editor"></div>
<textarea id="sectionDescription" name="sectionDescription" style="display:none;"></textarea>
<label for="codesection">Code section:</label>
<textarea id="codesection" name="codesection"></textarea>
<button type="submit">Add Section</button>
</form>
<script src="https://cdn.quilljs.com/1.3.6/quill.js"></script>
<script>
var quill = new Quill('#editor', {
theme: 'snow',
modules: {
toolbar: [
[{ 'header': [1, 2, 3, false] }],
['bold', 'italic', 'underline', 'strike'],
[{ 'list': 'ordered' }, { 'list': 'bullet' }],
['link', 'image', 'code-block'],
['clean']
]
}
});
document.getElementById('section-form').addEventListener('submit', function (event) {
debugger
var sectionDescription = quill.root.innerHTML;
document.getElementById('sectionDescription').value = sectionDescription;
});
</script>
</body>
</html>