@zipify/wysiwyg 1.0.0-dev.63 → 1.0.0-dev.66
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 +3791 -3766
- package/lib/Wysiwyg.vue +8 -0
- package/lib/__tests__/utils/index.js +0 -1
- package/lib/components/toolbar/ToolbarFull.vue +31 -8
- package/lib/composables/__tests__/useEditor.test.js +1 -1
- package/lib/extensions/__tests__/Alignment.test.js +1 -2
- package/lib/extensions/__tests__/BackgroundColor.test.js +1 -2
- package/lib/extensions/__tests__/CaseStyle.test.js +1 -2
- package/lib/extensions/__tests__/FontColor.test.js +1 -2
- package/lib/extensions/__tests__/FontFamily.test.js +1 -2
- package/lib/extensions/__tests__/FontSize.test.js +1 -2
- package/lib/extensions/__tests__/FontStyle.test.js +1 -2
- package/lib/extensions/__tests__/FontWeight.test.js +1 -2
- package/lib/extensions/__tests__/LineHeight.test.js +1 -2
- package/lib/extensions/__tests__/Link.test.js +1 -2
- package/lib/extensions/__tests__/StylePreset.test.js +1 -2
- package/lib/extensions/__tests__/TextDecoration.test.js +1 -2
- package/lib/extensions/core/TextProcessor.js +1 -24
- package/lib/extensions/core/__tests__/NodeProcessor.test.js +1 -2
- package/lib/extensions/core/__tests__/SelectionProcessor.test.js +1 -2
- package/lib/extensions/core/__tests__/TextProcessor.test.js +1 -2
- package/lib/extensions/list/__tests__/List.test.js +1 -2
- package/lib/index.js +2 -0
- package/lib/injectionTokens.js +2 -1
- package/lib/{__tests__/utils → services}/NodeFactory.js +1 -1
- package/lib/services/__tests__/ContentNormalizer.test.js +1 -1
- package/lib/services/index.js +1 -0
- 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,
|
|
@@ -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>
|
|
@@ -2,7 +2,7 @@ import { h, ref, toRef } from 'vue';
|
|
|
2
2
|
import { EditorContent } from '@tiptap/vue-2';
|
|
3
3
|
import { shallowMount } from '@vue/test-utils';
|
|
4
4
|
import { useEditor } from '../useEditor';
|
|
5
|
-
import { NodeFactory } from '../../
|
|
5
|
+
import { NodeFactory } from '../../services';
|
|
6
6
|
import { buildCoreExtensions } from '../../extensions/core';
|
|
7
7
|
|
|
8
8
|
const TestComponent = {
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { Editor, Extension } from '@tiptap/vue-2';
|
|
2
2
|
import { ref } from 'vue';
|
|
3
|
-
import { NodeFactory } from '../../__tests__/utils';
|
|
4
3
|
import { createCommand } from '../../utils';
|
|
5
4
|
import { Alignment } from '../Alignment';
|
|
6
5
|
import { DeviceManager } from '../DeviceManager';
|
|
7
6
|
import { Alignments } from '../../enums';
|
|
8
|
-
import { ContentNormalizer } from '../../services';
|
|
7
|
+
import { ContentNormalizer, NodeFactory } from '../../services';
|
|
9
8
|
import { buildCoreExtensions } from '../core';
|
|
10
9
|
|
|
11
10
|
const MockStylePreset = Extension.create({
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Editor, Extension } from '@tiptap/vue-2';
|
|
2
2
|
import { ref } from 'vue';
|
|
3
|
-
import { NodeFactory } from '../../__tests__/utils';
|
|
4
3
|
import { createCommand } from '../../utils';
|
|
5
4
|
import { BackgroundColor } from '../BackgroundColor';
|
|
6
|
-
import { ContentNormalizer } from '../../services';
|
|
5
|
+
import { ContentNormalizer, NodeFactory } from '../../services';
|
|
7
6
|
import { buildCoreExtensions } from '../core';
|
|
8
7
|
|
|
9
8
|
const MockStylePreset = Extension.create({
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Editor } from '@tiptap/vue-2';
|
|
2
|
-
import { NodeFactory } from '../../__tests__/utils';
|
|
3
2
|
import { CaseStyles } from '../../enums';
|
|
4
3
|
import { CaseStyle } from '../CaseStyle';
|
|
5
|
-
import { ContentNormalizer } from '../../services';
|
|
4
|
+
import { ContentNormalizer, NodeFactory } from '../../services';
|
|
6
5
|
import { buildCoreExtensions } from '../core';
|
|
7
6
|
|
|
8
7
|
function createEditor({ content }) {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Editor, Extension } from '@tiptap/vue-2';
|
|
2
2
|
import { ref } from 'vue';
|
|
3
|
-
import { NodeFactory } from '../../__tests__/utils';
|
|
4
3
|
import { createCommand } from '../../utils';
|
|
5
4
|
import { FontColor } from '../FontColor';
|
|
6
|
-
import { ContentNormalizer } from '../../services';
|
|
5
|
+
import { ContentNormalizer, NodeFactory } from '../../services';
|
|
7
6
|
import { buildCoreExtensions } from '../core';
|
|
8
7
|
|
|
9
8
|
const MockStylePreset = Extension.create({
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { Editor, Extension } from '@tiptap/vue-2';
|
|
2
2
|
import { ref } from 'vue';
|
|
3
|
-
import { NodeFactory } from '../../__tests__/utils';
|
|
4
3
|
import { createCommand } from '../../utils';
|
|
5
4
|
import { Font } from '../../models';
|
|
6
5
|
import { FontFamily } from '../FontFamily';
|
|
7
6
|
import { FontWeight } from '../FontWeight';
|
|
8
7
|
import { FontStyle } from '../FontStyle';
|
|
9
|
-
import { ContentNormalizer } from '../../services';
|
|
8
|
+
import { ContentNormalizer, NodeFactory } from '../../services';
|
|
10
9
|
import { buildCoreExtensions } from '../core';
|
|
11
10
|
|
|
12
11
|
const MockStylePreset = Extension.create({
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Editor, Extension } from '@tiptap/vue-2';
|
|
2
2
|
import { ref } from 'vue';
|
|
3
|
-
import { NodeFactory } from '../../__tests__/utils';
|
|
4
3
|
import { createCommand } from '../../utils';
|
|
5
4
|
import { FontSize } from '../FontSize';
|
|
6
5
|
import { DeviceManager } from '../DeviceManager';
|
|
7
|
-
import { ContentNormalizer } from '../../services';
|
|
6
|
+
import { ContentNormalizer, NodeFactory } from '../../services';
|
|
8
7
|
import { buildCoreExtensions } from '../core';
|
|
9
8
|
|
|
10
9
|
const MockStylePreset = Extension.create({
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { Editor, Extension } from '@tiptap/vue-2';
|
|
2
2
|
import { ref } from 'vue';
|
|
3
|
-
import { NodeFactory } from '../../__tests__/utils';
|
|
4
3
|
import { createCommand } from '../../utils';
|
|
5
4
|
import { FontStyle } from '../FontStyle';
|
|
6
5
|
import { FontFamily } from '../FontFamily';
|
|
7
6
|
import { Font } from '../../models';
|
|
8
7
|
import { FontWeight } from '../FontWeight';
|
|
9
|
-
import { ContentNormalizer } from '../../services';
|
|
8
|
+
import { ContentNormalizer, NodeFactory } from '../../services';
|
|
10
9
|
import { buildCoreExtensions } from '../core';
|
|
11
10
|
|
|
12
11
|
const MockStylePreset = Extension.create({
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { Editor, Extension } from '@tiptap/vue-2';
|
|
2
2
|
import { ref } from 'vue';
|
|
3
|
-
import { NodeFactory } from '../../__tests__/utils';
|
|
4
3
|
import { createCommand } from '../../utils';
|
|
5
4
|
import { Font } from '../../models';
|
|
6
5
|
import { FontWeight } from '../FontWeight';
|
|
7
6
|
import { FontFamily } from '../FontFamily';
|
|
8
7
|
import { FontStyle } from '../FontStyle';
|
|
9
|
-
import { ContentNormalizer } from '../../services';
|
|
8
|
+
import { ContentNormalizer, NodeFactory } from '../../services';
|
|
10
9
|
import { buildCoreExtensions } from '../core';
|
|
11
10
|
|
|
12
11
|
const MockStylePreset = Extension.create({
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Editor, Extension } from '@tiptap/vue-2';
|
|
2
2
|
import { ref } from 'vue';
|
|
3
|
-
import { NodeFactory } from '../../__tests__/utils';
|
|
4
3
|
import { createCommand } from '../../utils';
|
|
5
4
|
import { DeviceManager } from '../DeviceManager';
|
|
6
5
|
import { LineHeight } from '../LineHeight';
|
|
7
|
-
import { ContentNormalizer } from '../../services';
|
|
6
|
+
import { ContentNormalizer, NodeFactory } from '../../services';
|
|
8
7
|
import { buildCoreExtensions } from '../core';
|
|
9
8
|
|
|
10
9
|
const MockStylePreset = Extension.create({
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { ref } from 'vue';
|
|
2
2
|
import { Editor } from '@tiptap/vue-2';
|
|
3
|
-
import { ContentNormalizer } from '../../services';
|
|
3
|
+
import { ContentNormalizer, NodeFactory } from '../../services';
|
|
4
4
|
import { Link } from '../Link';
|
|
5
|
-
import { NodeFactory } from '../../__tests__/utils';
|
|
6
5
|
import { buildCoreExtensions } from '../core';
|
|
7
6
|
|
|
8
7
|
function createEditor({ content }) {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Editor, Extension, Mark } from '@tiptap/vue-2';
|
|
2
|
-
import { NodeFactory } from '../../__tests__/utils';
|
|
3
2
|
import { StylePreset } from '../StylePreset';
|
|
4
3
|
import { List } from '../list';
|
|
5
4
|
import { ListTypes, NodeTypes, TextSettings } from '../../enums';
|
|
6
|
-
import { ContentNormalizer } from '../../services';
|
|
5
|
+
import { ContentNormalizer, NodeFactory } from '../../services';
|
|
7
6
|
import { buildCoreExtensions } from '../core';
|
|
8
7
|
|
|
9
8
|
const MockFontSize = Mark.create({
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Editor, Extension } from '@tiptap/vue-2';
|
|
2
2
|
import { ref } from 'vue';
|
|
3
|
-
import { NodeFactory } from '../../__tests__/utils';
|
|
4
3
|
import { createCommand } from '../../utils';
|
|
5
4
|
import { TextDecoration } from '../TextDecoration';
|
|
6
|
-
import { ContentNormalizer } from '../../services';
|
|
5
|
+
import { ContentNormalizer, NodeFactory } from '../../services';
|
|
7
6
|
import { buildCoreExtensions } from '../core';
|
|
8
7
|
|
|
9
8
|
const MockStylePreset = Extension.create({
|
|
@@ -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
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Editor, Extension } from '@tiptap/vue-2';
|
|
2
|
-
import { NodeFactory } from '../../../__tests__/utils';
|
|
3
2
|
import { NodeTypes } from '../../../enums';
|
|
4
|
-
import { ContentNormalizer } from '../../../services';
|
|
3
|
+
import { ContentNormalizer, NodeFactory } from '../../../services';
|
|
5
4
|
import { buildCoreExtensions } from '../index';
|
|
6
5
|
|
|
7
6
|
const LineHeight = Extension.create({
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Editor } from '@tiptap/vue-2';
|
|
2
|
-
import { NodeFactory } from '../../../
|
|
3
|
-
import { ContentNormalizer } from '../../../services';
|
|
2
|
+
import { ContentNormalizer, NodeFactory } from '../../../services';
|
|
4
3
|
import { buildCoreExtensions } from '../index';
|
|
5
4
|
|
|
6
5
|
function createEditor() {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Editor, Mark, Extension } from '@tiptap/vue-2';
|
|
2
|
-
import { NodeFactory } from '../../../
|
|
3
|
-
import { ContentNormalizer } from '../../../services';
|
|
2
|
+
import { ContentNormalizer, NodeFactory } from '../../../services';
|
|
4
3
|
import { NodeTypes, TextSettings } from '../../../enums';
|
|
5
4
|
import { buildCoreExtensions } from '../index';
|
|
6
5
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Editor } from '@tiptap/vue-2';
|
|
2
|
-
import { NodeFactory } from '../../../__tests__/utils';
|
|
3
2
|
import { ListTypes } from '../../../enums';
|
|
4
3
|
import { StylePreset } from '../../StylePreset';
|
|
5
4
|
import { List } from '../List';
|
|
6
|
-
import { ContentNormalizer } from '../../../services';
|
|
5
|
+
import { ContentNormalizer, NodeFactory } from '../../../services';
|
|
7
6
|
import { buildCoreExtensions } from '../../core';
|
|
8
7
|
|
|
9
8
|
function createEditor({ content }) {
|
package/lib/index.js
CHANGED
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/lib/services/index.js
CHANGED
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';
|