@afeefa/vue-app 0.0.91 → 0.0.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.92
|
package/package.json
CHANGED
@@ -8,6 +8,7 @@
|
|
8
8
|
<v-btn
|
9
9
|
small
|
10
10
|
:class="['menu-button', {'is-active': focus && editor.isActive('bold')}]"
|
11
|
+
title="fett"
|
11
12
|
@click="editor.chain().focus().toggleBold().run()"
|
12
13
|
>
|
13
14
|
<v-icon>{{ boldIcon }}</v-icon>
|
@@ -16,6 +17,7 @@
|
|
16
17
|
<v-btn
|
17
18
|
small
|
18
19
|
:class="['menu-button', {'is-active': focus && editor.isActive('italic')}]"
|
20
|
+
title="kursiv"
|
19
21
|
@click="editor.chain().focus().toggleItalic().run()"
|
20
22
|
>
|
21
23
|
<v-icon>{{ italicIcon }}</v-icon>
|
@@ -24,6 +26,7 @@
|
|
24
26
|
<v-btn
|
25
27
|
small
|
26
28
|
:class="['menu-button', 'strike', {'is-active': focus && editor.isActive('strike')}]"
|
29
|
+
title="durchgestrichen"
|
27
30
|
@click="editor.chain().focus().toggleStrike().run()"
|
28
31
|
>
|
29
32
|
<v-icon>{{ strikeIcon }}</v-icon>
|
@@ -32,6 +35,7 @@
|
|
32
35
|
<v-btn
|
33
36
|
small
|
34
37
|
:class="['menu-button', {'is-active': focus && editor.isActive('heading', {level: 1})}]"
|
38
|
+
title="überschrift 1"
|
35
39
|
@click="editor.chain().focus().toggleHeading({level: 1}).run()"
|
36
40
|
>
|
37
41
|
<v-icon>{{ h1Icon }}</v-icon>
|
@@ -40,6 +44,7 @@
|
|
40
44
|
<v-btn
|
41
45
|
small
|
42
46
|
:class="['menu-button', {'is-active': focus && editor.isActive('heading', {level: 2})}]"
|
47
|
+
title="pberschrift 2"
|
43
48
|
@click="editor.chain().focus().toggleHeading({level: 2}).run()"
|
44
49
|
>
|
45
50
|
<v-icon>{{ h2Icon }}</v-icon>
|
@@ -48,6 +53,7 @@
|
|
48
53
|
<v-btn
|
49
54
|
small
|
50
55
|
:class="['menu-button', {'is-active': focus && editor.isActive('bulletList')}]"
|
56
|
+
title="punkt-liste"
|
51
57
|
@click="editor.chain().focus().toggleBulletList().run()"
|
52
58
|
>
|
53
59
|
<v-icon>{{ ulIcon }}</v-icon>
|
@@ -56,6 +62,7 @@
|
|
56
62
|
<v-btn
|
57
63
|
small
|
58
64
|
:class="['menu-button', {'is-active': focus && editor.isActive('orderedList')}]"
|
65
|
+
title="nummerierte liste"
|
59
66
|
@click="editor.chain().focus().toggleOrderedList().run()"
|
60
67
|
>
|
61
68
|
<v-icon>{{ olIcon }}</v-icon>
|
@@ -64,6 +71,7 @@
|
|
64
71
|
<v-btn
|
65
72
|
small
|
66
73
|
:class="['menu-button', {'is-active': focus && editor.isActive('blockquote')}]"
|
74
|
+
title="zitat"
|
67
75
|
@click="editor.chain().focus().toggleBlockquote().run()"
|
68
76
|
>
|
69
77
|
<v-icon>{{ commentIcon }}</v-icon>
|
@@ -72,13 +80,37 @@
|
|
72
80
|
<v-btn
|
73
81
|
small
|
74
82
|
class="menu-button"
|
83
|
+
:class="{ 'is-active': editor.isActive('textStyle', { color: '#0000FF' })}"
|
84
|
+
title="rot"
|
85
|
+
color="red--text"
|
86
|
+
@click="editor.chain().focus().setColor('#0000FF').run()"
|
87
|
+
>
|
88
|
+
<v-icon>$paletteIcon</v-icon>
|
89
|
+
</v-btn>
|
90
|
+
|
91
|
+
<v-btn
|
92
|
+
small
|
93
|
+
class="menu-button"
|
94
|
+
:class="{ 'is-active': editor.isActive('textStyle', { color: '#FF0000' })}"
|
95
|
+
title="blau"
|
96
|
+
color="blue--text"
|
97
|
+
@click="editor.chain().focus().setColor('#FF0000').run()"
|
98
|
+
>
|
99
|
+
<v-icon>$paletteIcon</v-icon>
|
100
|
+
</v-btn>
|
101
|
+
|
102
|
+
<v-btn
|
103
|
+
small
|
104
|
+
class="menu-button undo-button"
|
75
105
|
:disabled="initialValue === editor.getHTML()"
|
106
|
+
title="rückgängig"
|
76
107
|
@click="editor.chain().focus().undo().run()"
|
77
108
|
>
|
78
109
|
<v-icon>{{ undoIcon }}</v-icon>
|
79
110
|
</v-btn>
|
80
111
|
</div>
|
81
112
|
|
113
|
+
|
82
114
|
<div>
|
83
115
|
<slot name="buttons" />
|
84
116
|
</div>
|
@@ -108,6 +140,8 @@ import {
|
|
108
140
|
mdiRotateLeft,
|
109
141
|
mdiRotateRight
|
110
142
|
} from '@mdi/js'
|
143
|
+
import { Color } from '@tiptap/extension-color'
|
144
|
+
import TextStyle from '@tiptap/extension-text-style'
|
111
145
|
|
112
146
|
@Component({
|
113
147
|
props: ['value', 'validator'],
|
@@ -145,7 +179,9 @@ export default class ARichTextArea extends Vue {
|
|
145
179
|
this.editor = new Editor({
|
146
180
|
content: this.internalValue,
|
147
181
|
extensions: [
|
148
|
-
StarterKit
|
182
|
+
StarterKit,
|
183
|
+
TextStyle,
|
184
|
+
Color
|
149
185
|
],
|
150
186
|
onUpdate: () => {
|
151
187
|
this.$emit('input', this.editor.getHTML())
|
@@ -240,11 +276,18 @@ export default class ARichTextArea extends Vue {
|
|
240
276
|
width: unset;
|
241
277
|
}
|
242
278
|
|
279
|
+
&:disabled {
|
280
|
+
background: none !important;
|
281
|
+
:deep(*) {
|
282
|
+
color: #CCCCCC !important;
|
283
|
+
}
|
284
|
+
}
|
285
|
+
|
243
286
|
&.is-active {
|
244
287
|
background: #ECECEC !important;
|
245
288
|
}
|
246
289
|
|
247
|
-
|
290
|
+
&.menu-button:disabled {
|
248
291
|
background: none !important;
|
249
292
|
}
|
250
293
|
}
|
@@ -10,6 +10,10 @@ class CascadingWindowEventDispatcher {
|
|
10
10
|
addEventListener (event, listener) {
|
11
11
|
if (!this.listeners[event]) {
|
12
12
|
this.listeners[event] = []
|
13
|
+
}
|
14
|
+
|
15
|
+
if (!this.listeners[event].length) {
|
16
|
+
this.listeners[event] = []
|
13
17
|
|
14
18
|
window.addEventListener(event, e => {
|
15
19
|
for (const listener of this.listeners[event]) {
|
@@ -1,13 +1,14 @@
|
|
1
1
|
import {
|
2
2
|
mdiAlarmLightOutline,
|
3
|
-
mdiArrowLeft,
|
4
3
|
mdiAlert,
|
4
|
+
mdiArrowLeft,
|
5
5
|
mdiCalendar,
|
6
6
|
mdiCheck,
|
7
7
|
mdiCheckBold,
|
8
8
|
mdiChevronRight,
|
9
9
|
mdiClose,
|
10
10
|
mdiCloseThick,
|
11
|
+
mdiCurrencyEur,
|
11
12
|
mdiDelete,
|
12
13
|
mdiDotsHorizontal,
|
13
14
|
mdiDotsVertical,
|
@@ -16,11 +17,11 @@ import {
|
|
16
17
|
mdiMagnify,
|
17
18
|
mdiMenuDown,
|
18
19
|
mdiMenuUp,
|
20
|
+
mdiPalette,
|
19
21
|
mdiPencil,
|
20
22
|
mdiPlus,
|
21
23
|
mdiPrinter,
|
22
|
-
mdiThumbUpOutline
|
23
|
-
mdiCurrencyEur
|
24
|
+
mdiThumbUpOutline
|
24
25
|
} from '@mdi/js'
|
25
26
|
import Vue from 'vue'
|
26
27
|
import Vuetify from 'vuetify/lib'
|
@@ -52,7 +53,8 @@ export default new Vuetify({
|
|
52
53
|
caretDownIcon: mdiMenuDown,
|
53
54
|
caretUpIcon: mdiMenuUp,
|
54
55
|
printerIcon: mdiPrinter,
|
55
|
-
euroSymbol: mdiCurrencyEur
|
56
|
+
euroSymbol: mdiCurrencyEur,
|
57
|
+
paletteIcon: mdiPalette
|
56
58
|
}
|
57
59
|
},
|
58
60
|
breakpoint: {
|