@zipify/wysiwyg 1.0.0-dev.62 → 1.0.0-dev.65
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 +3688 -3729
- package/lib/Wysiwyg.vue +8 -0
- package/lib/assets/icons/background-color.svg +3 -1
- package/lib/assets/icons/font-color.svg +1 -3
- package/lib/components/toolbar/ToolbarFull.vue +31 -8
- package/lib/extensions/core/TextProcessor.js +1 -24
- package/lib/injectionTokens.js +2 -1
- package/package.json +1 -1
- package/lib/extensions/core/inputRules/closeDoubleQuote.js +0 -6
- package/lib/extensions/core/inputRules/closeSingleQuote.js +0 -6
- package/lib/extensions/core/inputRules/copyright.js +0 -6
- package/lib/extensions/core/inputRules/ellipsis.js +0 -6
- package/lib/extensions/core/inputRules/emDash.js +0 -6
- package/lib/extensions/core/inputRules/index.js +0 -9
- package/lib/extensions/core/inputRules/openDoubleQuote.js +0 -6
- package/lib/extensions/core/inputRules/openSingleQuote.js +0 -6
- package/lib/extensions/core/inputRules/registeredTrademark.js +0 -6
- package/lib/extensions/core/inputRules/trademark.js +0 -6
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,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">
|
|
2
|
-
<path fill="
|
|
2
|
+
<path fill="#fff" stroke="#B3B3B3" d="M4.5 4.5h19v19h-19z"/>
|
|
3
|
+
<path fill="#3B3B3B" d="M26 20.7a2.51 2.51 0 0 1-5 0c0-1.31 2.5-4.7 2.5-4.7s2.5 3.39 2.5 4.7Z"/>
|
|
4
|
+
<path fill="#3B3B3B" fill-rule="evenodd" d="M19.64 19.93h-1.715a.75.75 0 0 1-.475-.145.82.82 0 0 1-.268-.359l-.89-2.433h-4.943l-.89 2.433a.78.78 0 0 1-.26.347.73.73 0 0 1-.475.157H8L12.686 8h2.269l4.686 11.93Zm-7.721-4.505h3.803l-1.452-3.968a18.048 18.048 0 0 1-.219-.623c-.08-.24-.158-.5-.235-.78-.077.28-.152.542-.227.784a8.742 8.742 0 0 1-.218.635l-1.452 3.952Z" clip-rule="evenodd"/>
|
|
3
5
|
</svg>
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" style="width:var(--zw-icon-width);height:var(--zw-icon-height)" viewBox="0 0 28 28">
|
|
2
|
-
<path fill="
|
|
3
|
-
<path fill="#3B3B3B" d="M26 20.7a2.51 2.51 0 0 1-5 0c0-1.31 2.5-4.7 2.5-4.7s2.5 3.39 2.5 4.7Z"/>
|
|
4
|
-
<path fill="#3B3B3B" fill-rule="evenodd" d="M19.64 19.93h-1.715a.75.75 0 0 1-.475-.145.82.82 0 0 1-.268-.359l-.89-2.433h-4.943l-.89 2.433a.78.78 0 0 1-.26.347.73.73 0 0 1-.475.157H8L12.686 8h2.269l4.686 11.93Zm-7.721-4.505h3.803l-1.452-3.968a18.048 18.048 0 0 1-.219-.623c-.08-.24-.158-.5-.235-.78-.077.28-.152.542-.227.784a8.742 8.742 0 0 1-.218.635l-1.452 3.952Z" clip-rule="evenodd"/>
|
|
2
|
+
<path fill="var(--zw-icon-foreground)" fill-rule="evenodd" d="M22 20.62a2.42 2.42 0 0 1-4.84 0c0-1.25 2.42-4.54 2.42-4.54S22 19.37 22 20.62ZM9.92 15.425l1.452-3.951c.071-.182.145-.394.219-.636.074-.242.149-.503.226-.783a17.223 17.223 0 0 0 .454 1.402l1.452 3.968H9.919Zm5.411 4.199c.226-.795.658-1.684 1.184-2.562L12.955 8h-2.269L6 19.93h1.725a.736.736 0 0 0 .474-.157.792.792 0 0 0 .26-.347l.891-2.434h4.941l.891 2.434c.031.079.097.134.148.198Z" clip-rule="evenodd"/>
|
|
5
3
|
</svg>
|
|
@@ -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>
|
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
import { Extension } from '@tiptap/vue-2';
|
|
2
2
|
import { createCommand } from '../../utils';
|
|
3
|
-
import {
|
|
4
|
-
emDash,
|
|
5
|
-
registeredTrademark,
|
|
6
|
-
trademark,
|
|
7
|
-
ellipsis,
|
|
8
|
-
openDoubleQuote,
|
|
9
|
-
openSingleQuote,
|
|
10
|
-
closeDoubleQuote,
|
|
11
|
-
closeSingleQuote,
|
|
12
|
-
copyright
|
|
13
|
-
} from './inputRules';
|
|
14
3
|
|
|
15
4
|
export const TextProcessor = Extension.create({
|
|
16
5
|
name: 'text_processor',
|
|
@@ -51,17 +40,5 @@ export const TextProcessor = Extension.create({
|
|
|
51
40
|
});
|
|
52
41
|
})
|
|
53
42
|
};
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
addInputRules: () => [
|
|
57
|
-
emDash,
|
|
58
|
-
registeredTrademark,
|
|
59
|
-
trademark,
|
|
60
|
-
ellipsis,
|
|
61
|
-
openDoubleQuote,
|
|
62
|
-
openSingleQuote,
|
|
63
|
-
closeDoubleQuote,
|
|
64
|
-
closeSingleQuote,
|
|
65
|
-
copyright
|
|
66
|
-
]
|
|
43
|
+
}
|
|
67
44
|
});
|
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
|
});
|
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { closeDoubleQuote } from './closeDoubleQuote';
|
|
2
|
-
export { closeSingleQuote } from './closeSingleQuote';
|
|
3
|
-
export { copyright } from './copyright';
|
|
4
|
-
export { ellipsis } from './ellipsis';
|
|
5
|
-
export { emDash } from './emDash';
|
|
6
|
-
export { openDoubleQuote } from './openDoubleQuote';
|
|
7
|
-
export { openSingleQuote } from './openSingleQuote';
|
|
8
|
-
export { registeredTrademark } from './registeredTrademark';
|
|
9
|
-
export { trademark } from './trademark';
|