-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathexample.html
37 lines (37 loc) · 1.38 KB
/
example.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
<!DOCTYPE html>
<html>
<head>
<title>Medium editor list</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="//cdn.jsdelivr.net/medium-editor/latest/css/medium-editor.min.css" type="text/css" media="screen" charset="utf-8">
<style>
body, p, div {
margin: 0;
padding: 0;
}
#editor{ width: 100%; height: 100vh; }
</style>
</head>
<body>
<div id="editor"></div>
<script src="node_modules/medium-editor/dist/js/medium-editor.js" type="text/javascript"></script>
<script src="build/medium-editor-list.js" type="text/javascript"></script>
<script>
var editor = new MediumEditor(document.getElementById('editor'), {
toolbar: {
buttons: ['bold', 'italic', 'underline', 'list-extension']
},
extensions: {
'list-extension': new MediumEditorList()
},
mediumEditorList: {
newParagraphTemplate: '<li>...</li>',
buttonTemplate: '<b>List</b>',
addParagraphTemplate: 'Add new paragraph',
isEditable: true
}
});
</script>
</body>
</html>