-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathform-editor.js
65 lines (65 loc) · 1.85 KB
/
form-editor.js
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
60
61
62
63
64
65
$(function() {
'use strict'
var icons = Quill.import('ui/icons');
icons['bold'] = '<i class="la la-bold" aria-hidden="true"><\/i>';
icons['italic'] = '<i class="la la-italic" aria-hidden="true"><\/i>';
icons['underline'] = '<i class="la la-underline" aria-hidden="true"><\/i>';
icons['strike'] = '<i class="la la-strikethrough" aria-hidden="true"><\/i>';
icons['list']['ordered'] = '<i class="la la-list-ol" aria-hidden="true"><\/i>';
icons['list']['bullet'] = '<i class="la la-list-ul" aria-hidden="true"><\/i>';
icons['link'] = '<i class="la la-link" aria-hidden="true"><\/i>';
icons['image'] = '<i class="la la-image" aria-hidden="true"><\/i>';
icons['video'] = '<i class="la la-film" aria-hidden="true"><\/i>';
icons['code-block'] = '<i class="la la-code" aria-hidden="true"><\/i>';
var toolbarOptions = [
[{
'header': [1, 2, 3, 4, 5, 6, false]
}],
['bold', 'italic', 'underline', 'strike'],
[{
'list': 'ordered'
}, {
'list': 'bullet'
}],
['link', 'image', 'video']
];
var quill = new Quill('#quillEditor', {
modules: {
toolbar: toolbarOptions
},
theme: 'snow'
});
var quillModal = new Quill('#quillEditorModal', {
modules: {
toolbar: toolbarOptions
},
theme: 'snow'
});
var quillModal2 = new Quill('#quillEditorModal2', {
modules: {
toolbar: toolbarOptions
},
theme: 'snow'
});
var toolbarInlineOptions = [
['bold', 'italic', 'underline'],
[{
'header': 1
}, {
'header': 2
}, 'blockquote'],
['link', 'image', 'code-block'],
];
var quillInline = new Quill('#quillInline', {
modules: {
toolbar: toolbarInlineOptions
},
bounds: '#quillInline',
scrollingContainer: '#scrolling-container',
placeholder: 'Write something...',
theme: 'bubble'
});
new PerfectScrollbar('#scrolling-container', {
suppressScrollX: true
});
});