forked from hng5-blog-task/blog-task
-
Notifications
You must be signed in to change notification settings - Fork 0
/
editor.html
45 lines (39 loc) · 1.6 KB
/
editor.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<!-- Include external CSS. -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.25.0/codemirror.min.css">
<!-- Include Editor style. -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/css/froala_editor.pkgd.min.css" rel="stylesheet" type="text/css" />
<link href="https://cdn.jsdelivr.net/npm/[email protected]/css/froala_style.min.css" rel="stylesheet" type="text/css" />
</head>
<body>
<!-- Include external JS libs. -->
<script type="text/javascript" src="js/jquery-331.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.25.0/codemirror.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.25.0/mode/xml/xml.min.js"></script>
<!-- Include Editor JS files. -->
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]//js/froala_editor.pkgd.min.js"></script>
<div class="sample">
<h2>What's on your mind?</h2>
<form>
<textarea id="edit" name="content"></textarea>
<button type="submit">POST</button>
</form>
</div>
<!-- Initialize the editor. -->
<script>
$(function() {
$('#edit').froalaEditor({
// Set the file upload URL.
imageUploadURL: '/upload_image.php',
imageUploadParams: {
id: 'my_editor'
}
})
});
</script>
</body>
</html>