@zipify/wysiwyg 1.0.0-dev.49 → 1.0.0-dev.51
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/config/jest/setupTests.js +3 -0
- package/config/vite/lib.config.js +1 -1
- package/dist/wysiwyg.css +1 -1
- package/dist/wysiwyg.mjs +107 -107
- package/dist/wysiwyg.mjs.map +1 -1
- package/example/ExampleApp.vue +1 -1
- package/example/example.js +3 -0
- package/lib/Wysiwyg.vue +1 -1
- package/lib/__tests__/utils/withComponentContext.js +1 -1
- package/lib/components/base/Button.vue +1 -1
- package/lib/components/base/Icon.vue +1 -1
- package/lib/components/base/Modal.vue +1 -1
- package/lib/components/base/NumberField.vue +1 -1
- package/lib/components/base/Range.vue +1 -1
- package/lib/components/base/ScrollView.vue +1 -1
- package/lib/components/base/TextField.vue +1 -1
- package/lib/components/base/__tests__/Modal.test.js +1 -1
- package/lib/components/base/colorPicker/ColorPicker.vue +1 -1
- package/lib/components/base/colorPicker/composables/__tests__/usePickerApi.test.js +1 -1
- package/lib/components/base/colorPicker/composables/usePickerApi.js +1 -1
- package/lib/components/base/colorPicker/composables/usePickerHotkeys.js +1 -1
- package/lib/components/base/composables/__tests__/useActivatedListener.test.js +1 -1
- package/lib/components/base/composables/__tests__/useDeselectionLock.test.js +1 -1
- package/lib/components/base/composables/__tests__/useElementRef.test.js +1 -1
- package/lib/components/base/composables/__tests__/useModalToggler.test.js +1 -1
- package/lib/components/base/composables/__tests__/useNumberValue.test.js +1 -1
- package/lib/components/base/composables/__tests__/useScrollView.test.js +1 -1
- package/lib/components/base/composables/__tests__/useTempValue.test.js +1 -1
- package/lib/components/base/composables/useActivatedListener.js +1 -1
- package/lib/components/base/composables/useDeselectionLock.js +1 -1
- package/lib/components/base/composables/useElementRef.js +1 -1
- package/lib/components/base/composables/useModalToggler.js +1 -1
- package/lib/components/base/composables/useScrollView.js +1 -1
- package/lib/components/base/composables/useTempValue.js +1 -1
- package/lib/components/base/composables/useValidator.js +1 -1
- package/lib/components/base/dropdown/Dropdown.vue +1 -1
- package/lib/components/base/dropdown/DropdownActivator.vue +1 -1
- package/lib/components/base/dropdown/DropdownGroup.vue +1 -1
- package/lib/components/base/dropdown/DropdownMenu.vue +1 -1
- package/lib/components/base/dropdown/DropdownOption.vue +1 -1
- package/lib/components/base/dropdown/__tests__/DropdownActivator.test.js +1 -1
- package/lib/components/base/dropdown/__tests__/DropdownMenu.test.js +1 -1
- package/lib/components/base/dropdown/__tests__/DropdownOption.test.js +1 -1
- package/lib/components/base/dropdown/composables/__tests__/useActiveOptionManager.test.js +1 -1
- package/lib/components/base/dropdown/composables/__tests__/useDropdownEntityTitle.test.js +1 -1
- package/lib/components/base/dropdown/composables/useActiveOptionManager.js +1 -1
- package/lib/components/base/dropdown/composables/useDropdownEntityTitle.js +1 -1
- package/lib/components/toolbar/Toolbar.vue +1 -1
- package/lib/components/toolbar/ToolbarDivider.vue +1 -1
- package/lib/components/toolbar/__tests__/Toolbar.test.js +2 -2
- package/lib/components/toolbar/controls/AlignmentControl.vue +1 -1
- package/lib/components/toolbar/controls/AlignmentDeviceControl.vue +1 -1
- package/lib/components/toolbar/controls/BackgroundColorControl.vue +1 -1
- package/lib/components/toolbar/controls/CaseStyleControl.vue +1 -1
- package/lib/components/toolbar/controls/FontColorControl.vue +1 -1
- package/lib/components/toolbar/controls/FontFamilyControl.vue +1 -1
- package/lib/components/toolbar/controls/FontSizeControl.vue +1 -1
- package/lib/components/toolbar/controls/FontWeightControl.vue +1 -1
- package/lib/components/toolbar/controls/ItalicControl.vue +1 -1
- package/lib/components/toolbar/controls/LineHeightControl.vue +1 -1
- package/lib/components/toolbar/controls/ListControl.vue +1 -1
- package/lib/components/toolbar/controls/RemoveFormatControl.vue +1 -1
- package/lib/components/toolbar/controls/StrikeThroughControl.vue +1 -1
- package/lib/components/toolbar/controls/StylePresetControl.vue +1 -1
- package/lib/components/toolbar/controls/SuperscriptControl.vue +1 -1
- package/lib/components/toolbar/controls/UnderlineControl.vue +1 -1
- package/lib/components/toolbar/controls/__tests__/AlignmentControl.test.js +1 -1
- package/lib/components/toolbar/controls/__tests__/AlignmentDeviceControl.test.js +1 -1
- package/lib/components/toolbar/controls/__tests__/BackgroundColorControl.test.js +1 -1
- package/lib/components/toolbar/controls/__tests__/CaseStyleControl.test.js +1 -1
- package/lib/components/toolbar/controls/__tests__/FontColorControl.test.js +1 -1
- package/lib/components/toolbar/controls/__tests__/FontFamilyControl.test.js +1 -1
- package/lib/components/toolbar/controls/__tests__/FontSizeControl.test.js +1 -1
- package/lib/components/toolbar/controls/__tests__/FontWeightControl.test.js +1 -1
- package/lib/components/toolbar/controls/__tests__/ItalicControl.test.js +1 -1
- package/lib/components/toolbar/controls/__tests__/LineHeightControl.test.js +1 -1
- package/lib/components/toolbar/controls/__tests__/ListControl.test.js +1 -1
- package/lib/components/toolbar/controls/__tests__/StrikeThroughControl.test.js +1 -1
- package/lib/components/toolbar/controls/__tests__/StylePresetControl.test.js +1 -1
- package/lib/components/toolbar/controls/__tests__/UnderlineControl.test.js +1 -1
- package/lib/components/toolbar/controls/composables/useRecentFonts.js +1 -1
- package/lib/components/toolbar/controls/link/LinkControl.vue +1 -1
- package/lib/components/toolbar/controls/link/LinkControlHeader.vue +1 -1
- package/lib/components/toolbar/controls/link/__tests__/LinkControl.test.js +1 -1
- package/lib/components/toolbar/controls/link/composables/__tests__/useLink.test.js +1 -1
- package/lib/components/toolbar/controls/link/composables/useLink.js +1 -1
- package/lib/components/toolbar/controls/link/destination/LinkControlDestination.vue +1 -1
- package/lib/components/toolbar/controls/link/destination/LinkControlPageBlock.vue +1 -1
- package/lib/components/toolbar/controls/link/destination/__tests__/LinkControlPageBlock.test.js +1 -1
- package/lib/components/toolbar/controls/link/destination/__tests__/LinkControlUrl.test.js +1 -1
- package/lib/composables/__tests__/useEditor.test.js +1 -1
- package/lib/composables/useEditor.js +1 -1
- package/lib/extensions/Alignment.js +1 -1
- package/lib/extensions/BackgroundColor.js +1 -1
- package/lib/extensions/DeviceManager.js +1 -2
- package/lib/extensions/FontColor.js +1 -1
- package/lib/extensions/FontFamily.js +1 -1
- package/lib/extensions/FontSize.js +1 -1
- package/lib/extensions/FontStyle.js +1 -1
- package/lib/extensions/FontWeight.js +1 -1
- package/lib/extensions/LineHeight.js +1 -1
- package/lib/extensions/StylePreset.js +12 -7
- package/lib/extensions/TextDecoration.js +1 -1
- package/lib/extensions/__tests__/Alignment.test.js +2 -2
- package/lib/extensions/__tests__/BackgroundColor.test.js +1 -1
- package/lib/extensions/__tests__/FontColor.test.js +1 -1
- package/lib/extensions/__tests__/FontFamily.test.js +1 -1
- package/lib/extensions/__tests__/FontSize.test.js +2 -2
- package/lib/extensions/__tests__/FontStyle.test.js +1 -1
- package/lib/extensions/__tests__/FontWeight.test.js +1 -1
- package/lib/extensions/__tests__/LineHeight.test.js +2 -2
- package/lib/extensions/__tests__/Link.test.js +1 -1
- package/lib/extensions/__tests__/StylePreset.test.js +2 -1
- package/lib/extensions/__tests__/TextDecoration.test.js +1 -1
- package/lib/extensions/core/NodeProcessor.js +1 -1
- package/lib/extensions/list/List.js +1 -1
- package/lib/extensions/list/__tests__/List.test.js +3 -2
- package/lib/services/__tests__/FavoriteColors.test.js +1 -1
- package/lib/styles/content.css +6 -4
- package/package.json +7 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
-
import { ref } from 'vue';
|
|
2
|
+
import { ref } from '@vue/composition-api';
|
|
3
3
|
import { InjectionTokens } from '../../../../injectionTokens';
|
|
4
4
|
import { Dropdown } from '../../../base';
|
|
5
5
|
import FontSizeControl from '../FontSizeControl';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
-
import { ref } from 'vue';
|
|
2
|
+
import { ref } from '@vue/composition-api';
|
|
3
3
|
import { InjectionTokens } from '../../../../injectionTokens';
|
|
4
4
|
import { Dropdown } from '../../../base';
|
|
5
5
|
import FontWeightControl from '../FontWeightControl';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
-
import { ref } from 'vue';
|
|
2
|
+
import { ref } from '@vue/composition-api';
|
|
3
3
|
import { InjectionTokens } from '../../../../injectionTokens';
|
|
4
4
|
import { Button } from '../../../base';
|
|
5
5
|
import ItalicControl from '../ItalicControl';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
-
import { h, nextTick, ref } from 'vue';
|
|
2
|
+
import { h, nextTick, ref } from '@vue/composition-api';
|
|
3
3
|
import { InjectionTokens } from '../../../../injectionTokens';
|
|
4
4
|
import { Button, Modal, NumberField, Range } from '../../../base';
|
|
5
5
|
import LineHeightControl from '../LineHeightControl';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
-
import { h, ref } from 'vue';
|
|
2
|
+
import { h, ref } from '@vue/composition-api';
|
|
3
3
|
import { InjectionTokens } from '../../../../injectionTokens';
|
|
4
4
|
import { Dropdown, Icon } from '../../../base';
|
|
5
5
|
import ListControl from '../ListControl';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
-
import { ref } from 'vue';
|
|
2
|
+
import { ref } from '@vue/composition-api';
|
|
3
3
|
import { InjectionTokens } from '../../../../injectionTokens';
|
|
4
4
|
import { Button } from '../../../base';
|
|
5
5
|
import StrikeThroughControl from '../StrikeThroughControl';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
-
import { ref } from 'vue';
|
|
2
|
+
import { ref } from '@vue/composition-api';
|
|
3
3
|
import { InjectionTokens } from '../../../../injectionTokens';
|
|
4
4
|
import { Button, Dropdown } from '../../../base';
|
|
5
5
|
import StylePresetControl from '../StylePresetControl';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
-
import { ref } from 'vue';
|
|
2
|
+
import { ref } from '@vue/composition-api';
|
|
3
3
|
import { InjectionTokens } from '../../../../injectionTokens';
|
|
4
4
|
import { Button } from '../../../base';
|
|
5
5
|
import UnderlineControl from '../UnderlineControl';
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
</template>
|
|
32
32
|
|
|
33
33
|
<script>
|
|
34
|
-
import { computed, ref, inject } from 'vue';
|
|
34
|
+
import { computed, ref, inject } from '@vue/composition-api';
|
|
35
35
|
import { InjectionTokens } from '../../../../injectionTokens';
|
|
36
36
|
import { tooltip } from '../../../../directives';
|
|
37
37
|
import { useValidator } from '../../../base/composables';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { shallowMount } from '@vue/test-utils';
|
|
2
|
-
import { ref, nextTick } from 'vue';
|
|
2
|
+
import { ref, nextTick } from '@vue/composition-api';
|
|
3
3
|
import LinkControl from '../LinkControl';
|
|
4
4
|
import { InjectionTokens } from '../../../../../injectionTokens';
|
|
5
5
|
import { Button, TextField } from '../../../../base';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref } from 'vue';
|
|
1
|
+
import { ref } from '@vue/composition-api';
|
|
2
2
|
import { withComponentContext } from '../../../../../../__tests__/utils';
|
|
3
3
|
import { InjectionTokens } from '../../../../../../injectionTokens';
|
|
4
4
|
import { LinkDestinations, LinkTargets } from '../../../../../../enums';
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
</template>
|
|
40
40
|
|
|
41
41
|
<script>
|
|
42
|
-
import { computed, toRef } from 'vue';
|
|
42
|
+
import { computed, toRef } from '@vue/composition-api';
|
|
43
43
|
import { LinkDestinations, LinkTargets } from '../../../../../enums';
|
|
44
44
|
import { Dropdown, DropdownOption, FieldLabel } from '../../../../base';
|
|
45
45
|
import LinkControlPageBlock from './LinkControlPageBlock';
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
</template>
|
|
23
23
|
|
|
24
24
|
<script>
|
|
25
|
-
import { inject } from 'vue';
|
|
25
|
+
import { inject } from '@vue/composition-api';
|
|
26
26
|
import { FieldLabel, DropdownOption, Dropdown } from '../../../../base';
|
|
27
27
|
import { InjectionTokens } from '../../../../../injectionTokens';
|
|
28
28
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Editor } from '@tiptap/vue-2';
|
|
2
|
-
import { onUnmounted, watch, reactive } from 'vue';
|
|
2
|
+
import { onUnmounted, watch, reactive } from '@vue/composition-api';
|
|
3
3
|
import { ContentNormalizer } from '../services';
|
|
4
4
|
|
|
5
5
|
export function useEditor({ content, onChange, extensions }) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Extension } from '@tiptap/vue-2';
|
|
2
|
-
import { computed } from 'vue';
|
|
2
|
+
import { computed } from '@vue/composition-api';
|
|
3
3
|
import { convertAlignment, createCommand, createKeyboardShortcut, renderInlineSetting } from '../utils';
|
|
4
4
|
import { Alignments, NodeTypes, TextSettings } from '../enums';
|
|
5
5
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { toRef } from 'vue';
|
|
2
1
|
import { Extension } from '@tiptap/vue-2';
|
|
3
2
|
import { createCommand } from '../utils';
|
|
4
3
|
|
|
@@ -7,7 +6,7 @@ export const DeviceManager = Extension.create({
|
|
|
7
6
|
|
|
8
7
|
addCommands() {
|
|
9
8
|
return {
|
|
10
|
-
getDevice: createCommand(() =>
|
|
9
|
+
getDevice: createCommand(() => this.options.deviceRef)
|
|
11
10
|
};
|
|
12
11
|
}
|
|
13
12
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Extension } from '@tiptap/vue-2';
|
|
2
|
-
import { computed, toRef } from 'vue';
|
|
2
|
+
import { computed, toRef } from '@vue/composition-api';
|
|
3
3
|
import { Heading } from '@tiptap/extension-heading';
|
|
4
4
|
import { createCommand } from '../utils';
|
|
5
5
|
import { Devices, NodeTypes, TextSettings } from '../enums';
|
|
@@ -35,7 +35,7 @@ export const StylePreset = Extension.create({
|
|
|
35
35
|
default: { id: this.options.defaultId },
|
|
36
36
|
|
|
37
37
|
parseHTML: (element) => {
|
|
38
|
-
const presets = this.options.
|
|
38
|
+
const presets = this.options.presetsRef.value;
|
|
39
39
|
|
|
40
40
|
if (element.parentElement.tagName === 'LI') return null;
|
|
41
41
|
|
|
@@ -72,7 +72,7 @@ export const StylePreset = Extension.create({
|
|
|
72
72
|
|
|
73
73
|
return {
|
|
74
74
|
getPresetList: createCommand(() => computed(() => {
|
|
75
|
-
return this.options.
|
|
75
|
+
return this.options.presetsRef.value.filter((preset) => !preset.hidden);
|
|
76
76
|
})),
|
|
77
77
|
|
|
78
78
|
getPreset: createCommand(({ commands }) => {
|
|
@@ -150,9 +150,14 @@ export const StylePreset = Extension.create({
|
|
|
150
150
|
.run();
|
|
151
151
|
}),
|
|
152
152
|
|
|
153
|
-
removeFormat: createCommand(({
|
|
154
|
-
|
|
155
|
-
|
|
153
|
+
removeFormat: createCommand(({ chain }) => {
|
|
154
|
+
chain()
|
|
155
|
+
.storeSelection()
|
|
156
|
+
.expandSelectionToBlock()
|
|
157
|
+
.unsetAllMarks()
|
|
158
|
+
.applyDefaultPreset()
|
|
159
|
+
.restoreSelection()
|
|
160
|
+
.run();
|
|
156
161
|
})
|
|
157
162
|
};
|
|
158
163
|
},
|
|
@@ -168,7 +173,7 @@ export const StylePreset = Extension.create({
|
|
|
168
173
|
this.storage.presetStyleEl = ContextWindow.document.createElement('style');
|
|
169
174
|
this.storage.presetStyleEl.dataset.zwStyles = '';
|
|
170
175
|
|
|
171
|
-
for (const preset of this.options.
|
|
176
|
+
for (const preset of this.options.presetsRef.value) {
|
|
172
177
|
const className = makePresetClass(this.options.baseClass, preset);
|
|
173
178
|
const css = [` ${className} {`];
|
|
174
179
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Editor, Extension } from '@tiptap/vue-2';
|
|
2
|
-
import { ref } from 'vue';
|
|
2
|
+
import { ref } from '@vue/composition-api';
|
|
3
3
|
import { NodeFactory } from '../../__tests__/utils';
|
|
4
4
|
import { createCommand } from '../../utils';
|
|
5
5
|
import { Alignment } from '../Alignment';
|
|
@@ -27,7 +27,7 @@ function createEditor({ content }) {
|
|
|
27
27
|
content: ContentNormalizer.normalize(content),
|
|
28
28
|
extensions: buildCoreExtensions().concat(
|
|
29
29
|
MockStylePreset,
|
|
30
|
-
DeviceManager.configure({
|
|
30
|
+
DeviceManager.configure({ deviceRef: ref('desktop') }),
|
|
31
31
|
Alignment
|
|
32
32
|
)
|
|
33
33
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Editor, Extension } from '@tiptap/vue-2';
|
|
2
|
-
import { ref } from 'vue';
|
|
2
|
+
import { ref } from '@vue/composition-api';
|
|
3
3
|
import { NodeFactory } from '../../__tests__/utils';
|
|
4
4
|
import { createCommand } from '../../utils';
|
|
5
5
|
import { BackgroundColor } from '../BackgroundColor';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Editor, Extension } from '@tiptap/vue-2';
|
|
2
|
-
import { ref } from 'vue';
|
|
2
|
+
import { ref } from '@vue/composition-api';
|
|
3
3
|
import { NodeFactory } from '../../__tests__/utils';
|
|
4
4
|
import { createCommand } from '../../utils';
|
|
5
5
|
import { FontColor } from '../FontColor';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Editor, Extension } from '@tiptap/vue-2';
|
|
2
|
-
import { ref } from 'vue';
|
|
2
|
+
import { ref } from '@vue/composition-api';
|
|
3
3
|
import { NodeFactory } from '../../__tests__/utils';
|
|
4
4
|
import { createCommand } from '../../utils';
|
|
5
5
|
import { FontSize } from '../FontSize';
|
|
@@ -27,7 +27,7 @@ function createEditor({ content }) {
|
|
|
27
27
|
extensions: buildCoreExtensions().concat(
|
|
28
28
|
MockStylePreset,
|
|
29
29
|
DeviceManager.configure({
|
|
30
|
-
|
|
30
|
+
deviceRef: ref('desktop')
|
|
31
31
|
}),
|
|
32
32
|
FontSize.configure({
|
|
33
33
|
minSize: 5,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Editor, Extension } from '@tiptap/vue-2';
|
|
2
|
-
import { ref } from 'vue';
|
|
2
|
+
import { ref } from '@vue/composition-api';
|
|
3
3
|
import { NodeFactory } from '../../__tests__/utils';
|
|
4
4
|
import { createCommand } from '../../utils';
|
|
5
5
|
import { FontStyle } from '../FontStyle';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Editor, Extension } from '@tiptap/vue-2';
|
|
2
|
-
import { ref } from 'vue';
|
|
2
|
+
import { ref } from '@vue/composition-api';
|
|
3
3
|
import { NodeFactory } from '../../__tests__/utils';
|
|
4
4
|
import { createCommand } from '../../utils';
|
|
5
5
|
import { DeviceManager } from '../DeviceManager';
|
|
@@ -27,7 +27,7 @@ function createEditor({ content, wrapperEl }) {
|
|
|
27
27
|
extensions: buildCoreExtensions().concat(
|
|
28
28
|
MockStylePreset,
|
|
29
29
|
DeviceManager.configure({
|
|
30
|
-
|
|
30
|
+
deviceRef: ref('desktop')
|
|
31
31
|
}),
|
|
32
32
|
LineHeight.configure({
|
|
33
33
|
wrapperRef: ref(wrapperEl ?? document.createElement('div'))
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Editor, Extension, Mark } from '@tiptap/vue-2';
|
|
2
|
+
import { ref } from '@vue/composition-api';
|
|
2
3
|
import { NodeFactory } from '../../__tests__/utils';
|
|
3
4
|
import { StylePreset } from '../StylePreset';
|
|
4
5
|
import { List } from '../list';
|
|
@@ -110,7 +111,7 @@ function createEditor({ content, presets, defaultId }) {
|
|
|
110
111
|
|
|
111
112
|
extensions: buildCoreExtensions().concat(
|
|
112
113
|
StylePreset.configure({
|
|
113
|
-
|
|
114
|
+
presetsRef: ref(presets),
|
|
114
115
|
baseClass: 'zw ts-',
|
|
115
116
|
defaultId,
|
|
116
117
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Editor, Extension } from '@tiptap/vue-2';
|
|
2
|
-
import { ref } from 'vue';
|
|
2
|
+
import { ref } from '@vue/composition-api';
|
|
3
3
|
import { NodeFactory } from '../../__tests__/utils';
|
|
4
4
|
import { createCommand } from '../../utils';
|
|
5
5
|
import { TextDecoration } from '../TextDecoration';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Node, wrappingInputRule } from '@tiptap/vue-2';
|
|
2
|
-
import { computed } from 'vue';
|
|
2
|
+
import { computed } from '@vue/composition-api';
|
|
3
3
|
import { createCommand } from '../../utils';
|
|
4
4
|
import { ListTypes, NodeTypes } from '../../enums';
|
|
5
5
|
import { ListItem } from './ListItem';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Editor } from '@tiptap/vue-2';
|
|
2
|
+
import { ref } from '@vue/composition-api';
|
|
2
3
|
import { NodeFactory } from '../../../__tests__/utils';
|
|
3
4
|
import { ListTypes } from '../../../enums';
|
|
4
5
|
import { StylePreset } from '../../StylePreset';
|
|
@@ -15,7 +16,7 @@ function createEditor({ content }) {
|
|
|
15
16
|
baseClass: 'zw-list--'
|
|
16
17
|
}),
|
|
17
18
|
StylePreset.configure({
|
|
18
|
-
|
|
19
|
+
presetsRef: ref([
|
|
19
20
|
{
|
|
20
21
|
id: 'regular-1',
|
|
21
22
|
common: {},
|
|
@@ -23,7 +24,7 @@ function createEditor({ content }) {
|
|
|
23
24
|
tablet: {},
|
|
24
25
|
desktop: {}
|
|
25
26
|
}
|
|
26
|
-
],
|
|
27
|
+
]),
|
|
27
28
|
defaultId: 'regular-1',
|
|
28
29
|
baseClass: 'zw ts-'
|
|
29
30
|
})
|
package/lib/styles/content.css
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
pointer-events: none;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
.zw-style {
|
|
13
|
+
.zw-style.zw-style.zw-style {
|
|
14
14
|
font-weight: var(--zw-font-weight, var(--zw-preset-font-weight));
|
|
15
15
|
font-family: var(--zw-font-family, var(--zw-preset-font-family));
|
|
16
16
|
color: var(--zw-font-color, var(--zw-preset-color));
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
@media (min-width: 1200px) {
|
|
23
23
|
|
|
24
|
-
.zw-style {
|
|
24
|
+
.zw-style.zw-style.zw-style {
|
|
25
25
|
font-size: var(--zw-font-size-desktop, var(--zw-preset-desktop-font-size));
|
|
26
26
|
text-align: var(--zw-text-align-desktop, var(--zw-preset-desktop-text-align));
|
|
27
27
|
line-height: var(--zw-line-height-desktop, var(--zw-preset-desktop-line-height));
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
|
|
31
31
|
@media (min-width: 769px) and (max-width: 1199.98px) {
|
|
32
32
|
|
|
33
|
-
.zw-style {
|
|
33
|
+
.zw-style.zw-style.zw-style {
|
|
34
34
|
font-size: var(--zw-font-size-tablet, var(--zw-preset-tablet-font-size));
|
|
35
35
|
text-align: var(--zw-text-align-tablet, var(--zw-preset-tablet-text-align));
|
|
36
36
|
line-height: var(--zw-line-height-tablet, var(--zw-preset-tablet-line-height));
|
|
@@ -39,15 +39,17 @@
|
|
|
39
39
|
|
|
40
40
|
@media (max-width: 768.98px) {
|
|
41
41
|
|
|
42
|
-
.zw-style {
|
|
42
|
+
.zw-style.zw-style.zw-style {
|
|
43
43
|
font-size: var(--zw-font-size-mobile, var(--zw-preset-mobile-font-size));
|
|
44
44
|
text-align: var(--zw-text-align-mobile, var(--zw-preset-mobile-text-align));
|
|
45
45
|
line-height: var(--zw-line-height-mobile, var(--zw-preset-mobile-line-height));
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
|
|
49
50
|
/* ProseMirror styles */
|
|
50
51
|
|
|
52
|
+
|
|
51
53
|
.ProseMirror {
|
|
52
54
|
position: relative;
|
|
53
55
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zipify/wysiwyg",
|
|
3
|
-
"version": "1.0.0-dev.
|
|
3
|
+
"version": "1.0.0-dev.51",
|
|
4
4
|
"description": "Zipify modification of TipTap text editor",
|
|
5
5
|
"main": "dist/wysiwyg.mjs",
|
|
6
6
|
"repository": {
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"simplebar": "^5.3.8"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
|
-
"@
|
|
43
|
-
"
|
|
42
|
+
"@vue/composition-api": "*",
|
|
43
|
+
"@zipify/colorpicker": "2.*"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@babel/core": "^7.18.9",
|
|
@@ -48,9 +48,10 @@
|
|
|
48
48
|
"@babel/plugin-transform-runtime": "^7.18.9",
|
|
49
49
|
"@babel/preset-env": "^7.18.9",
|
|
50
50
|
"@babel/runtime": "^7.18.9",
|
|
51
|
+
"@vue/composition-api": "^1.7.0",
|
|
51
52
|
"@vue/test-utils": "^1.3.0",
|
|
52
53
|
"@vue/vue2-jest": "^28.0.1",
|
|
53
|
-
"@zipify/colorpicker": "^2.0.
|
|
54
|
+
"@zipify/colorpicker": "^2.0.1",
|
|
54
55
|
"babel-jest": "^28.1.3",
|
|
55
56
|
"eslint": "^8.20.0",
|
|
56
57
|
"eslint-plugin-import": "^2.26.0",
|
|
@@ -66,7 +67,7 @@
|
|
|
66
67
|
"svgo": "^2.8.0",
|
|
67
68
|
"vite": "^3.0.4",
|
|
68
69
|
"vite-plugin-vue2": "^2.0.2",
|
|
69
|
-
"vue": "^2.
|
|
70
|
-
"vue-template-compiler": "^2.
|
|
70
|
+
"vue": "^2.6.14",
|
|
71
|
+
"vue-template-compiler": "^2.6.14"
|
|
71
72
|
}
|
|
72
73
|
}
|