Skip to content

Commit 59e016e

Browse files
committed
feat: Further QEditor work
1 parent 0a290ff commit 59e016e

File tree

3 files changed

+28
-20
lines changed

3 files changed

+28
-20
lines changed

dev/components/form/editor.vue

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,34 @@
33
<q-editor
44
ref="editor"
55
v-model="model"
6+
small
67
push glossy
78
:toolbar="[
8-
['bold', 'italic', 'h1', 'p', 'link', 'gigi'],
9-
['gogu', 'print', 'custom_btn'],
10-
['token'],
11-
['bullet'],
12-
[{
13-
label: 'Font Size',
14-
options: ['size-1', 'size-2', 'size-3', 'size-4', 'size-5', 'size-6', 'size-7']
15-
},
16-
{
17-
label: 'Formatting',
18-
options: ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'code']
19-
},
20-
{
21-
label: 'Font',
22-
options: ['font_arial', 'font_arial_black', 'font_courier_new', 'font_times_new_roman']
23-
}],
9+
['bold', 'italic', 'strike', 'underline', 'subscript', 'superscript'],
10+
['token', 'hr', 'link', 'custom_btn'],
11+
[
12+
{
13+
label: 'Font Size',
14+
options: ['size-1', 'size-2', 'size-3', 'size-4', 'size-5', 'size-6', 'size-7']
15+
},
16+
{
17+
label: 'Formatting',
18+
options: ['p', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'code']
19+
},
20+
{
21+
label: 'Font',
22+
options: ['font_arial', 'font_arial_black', 'font_courier_new', 'font_times_new_roman']
23+
},
24+
'removeFormat'
25+
],
26+
['quote', 'bullet', 'number', 'outdent', 'indent'],
27+
['left', 'center', 'right', 'justify'],
28+
['print'],
29+
['undo', 'redo'],
2430
[{
2531
label: 'Dropdown Test',
2632
options: ['gogu', 'outdent', 'indent', 'gigi']
27-
}],
28-
['undo', 'redo']
33+
}]
2934
]"
3035
:definitions="{
3136
gigi: {cmd: 'bold', icon: 'map', tip: 'Gigi bold'},

src/components/editor/QEditor.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ export default {
2727
rounded: Boolean,
2828
push: Boolean,
2929
glossy: Boolean,
30+
small: Boolean,
31+
big: Boolean,
3032
definitions: Object,
3133
toolbar: {
3234
type: Array,
@@ -50,7 +52,9 @@ export default {
5052
flat: this.flat,
5153
rounded: this.rounded,
5254
push: this.push,
53-
glossy: this.glossy
55+
glossy: this.glossy,
56+
small: this.small,
57+
big: this.big
5458
}
5559
},
5660
buttons () {

src/components/editor/editor-definitions.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ export const buttons = {
1616
right: {cmd: 'justifyRight', icon: 'format_align_right', tip: 'Right align'},
1717
justify: {cmd: 'justifyFull', icon: 'format_align_justify', tip: 'Justify align'},
1818

19-
// run
2019
print: {type: 'no-state', cmd: 'print', icon: 'print', tip: 'Print'},
2120
outdent: {type: 'no-state', disable: vm => vm.caret && !vm.caret.can('outdent'), cmd: 'outdent', icon: 'format_indent_decrease', tip: 'Decrease indentation'},
2221
indent: {type: 'no-state', disable: vm => vm.caret && !vm.caret.can('indent'), cmd: 'indent', icon: 'format_indent_increase', tip: 'Increase indentation'},

0 commit comments

Comments
 (0)