@zipify/wysiwyg 1.0.0-dev.63 → 1.0.0-dev.64
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.
- package/dist/wysiwyg.mjs +243 -230
- package/lib/Wysiwyg.vue +8 -0
- package/lib/components/toolbar/ToolbarFull.vue +31 -8
- package/lib/injectionTokens.js +2 -1
- package/package.json +1 -1
package/lib/Wysiwyg.vue
CHANGED
|
@@ -113,6 +113,13 @@ export default {
|
|
|
113
113
|
default: false
|
|
114
114
|
},
|
|
115
115
|
|
|
116
|
+
// Temporary until migrations static accordion to sidebar
|
|
117
|
+
popupMode: {
|
|
118
|
+
type: Boolean,
|
|
119
|
+
required: false,
|
|
120
|
+
default: false
|
|
121
|
+
},
|
|
122
|
+
|
|
116
123
|
// Requires Window type but it different in iframe and outside
|
|
117
124
|
// eslint-disable-next-line vue/require-prop-types
|
|
118
125
|
window: {
|
|
@@ -185,6 +192,7 @@ export default {
|
|
|
185
192
|
provide(InjectionTokens.LOCAL_STORAGE, new Storage(localStorage));
|
|
186
193
|
provide(InjectionTokens.FAVORITE_COLORS, favoriteColors);
|
|
187
194
|
provide(InjectionTokens.PAGE_BLOCKS, pageBlocks);
|
|
195
|
+
provide(InjectionTokens.POPUP_MODE, props.popupMode);
|
|
188
196
|
|
|
189
197
|
return {
|
|
190
198
|
editor,
|
|
@@ -14,20 +14,35 @@
|
|
|
14
14
|
<FontColorControl />
|
|
15
15
|
<BackgroundColorControl />
|
|
16
16
|
</ToolbarGroup>
|
|
17
|
+
|
|
18
|
+
<template v-if="isPopupMode">
|
|
19
|
+
<ToolbarDivider vertical />
|
|
20
|
+
|
|
21
|
+
<ToolbarGroup>
|
|
22
|
+
<ItalicControl />
|
|
23
|
+
<UnderlineControl />
|
|
24
|
+
<StrikeThroughControl />
|
|
25
|
+
<SuperscriptControl />
|
|
26
|
+
<CaseStyleControl />
|
|
27
|
+
</ToolbarGroup>
|
|
28
|
+
</template>
|
|
17
29
|
</ToolbarRow>
|
|
18
30
|
|
|
19
31
|
<ToolbarDivider horizontal />
|
|
20
32
|
|
|
21
33
|
<ToolbarRow>
|
|
22
|
-
<
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
34
|
+
<template v-if="!isPopupMode">
|
|
35
|
+
<ToolbarGroup>
|
|
36
|
+
<ItalicControl />
|
|
37
|
+
<UnderlineControl />
|
|
38
|
+
<StrikeThroughControl />
|
|
39
|
+
<SuperscriptControl />
|
|
40
|
+
<CaseStyleControl />
|
|
41
|
+
</ToolbarGroup>
|
|
42
|
+
|
|
43
|
+
<ToolbarDivider vertical />
|
|
44
|
+
</template>
|
|
29
45
|
|
|
30
|
-
<ToolbarDivider vertical />
|
|
31
46
|
<AlignmentControl />
|
|
32
47
|
<ToolbarDivider vertical />
|
|
33
48
|
|
|
@@ -52,6 +67,8 @@
|
|
|
52
67
|
</template>
|
|
53
68
|
|
|
54
69
|
<script>
|
|
70
|
+
import { inject } from 'vue';
|
|
71
|
+
import { InjectionTokens } from '../../injectionTokens';
|
|
55
72
|
import ToolbarDivider from './ToolbarDivider';
|
|
56
73
|
import ToolbarRow from './ToolbarRow';
|
|
57
74
|
import ToolbarGroup from './ToolbarGroup';
|
|
@@ -97,6 +114,12 @@ export default {
|
|
|
97
114
|
ListControl,
|
|
98
115
|
RemoveFormatControl,
|
|
99
116
|
LinkControl
|
|
117
|
+
},
|
|
118
|
+
|
|
119
|
+
setup() {
|
|
120
|
+
const isPopupMode = inject(InjectionTokens.POPUP_MODE);
|
|
121
|
+
|
|
122
|
+
return { isPopupMode };
|
|
100
123
|
}
|
|
101
124
|
};
|
|
102
125
|
</script>
|
package/lib/injectionTokens.js
CHANGED
|
@@ -4,5 +4,6 @@ export const InjectionTokens = Object.freeze({
|
|
|
4
4
|
EDITOR: Symbol('editor'),
|
|
5
5
|
LOCAL_STORAGE: Symbol('localStorage'),
|
|
6
6
|
FAVORITE_COLORS: Symbol('favoriteColors'),
|
|
7
|
-
PAGE_BLOCKS: Symbol('pageBlocks')
|
|
7
|
+
PAGE_BLOCKS: Symbol('pageBlocks'),
|
|
8
|
+
POPUP_MODE: Symbol('popupMode')
|
|
8
9
|
});
|