@zipify/wysiwyg 1.0.0-dev.16 → 1.0.0-dev.19

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.
Files changed (100) hide show
  1. package/.github/dependabot.yaml +1 -0
  2. package/dist/wysiwyg.css +293 -12
  3. package/dist/wysiwyg.js +1 -1
  4. package/example/ExampleApp.vue +6 -2
  5. package/example/pageBlocks.js +31 -0
  6. package/example/presets.js +2 -2
  7. package/lib/Wysiwyg.vue +16 -6
  8. package/lib/assets/icons/link.svg +3 -0
  9. package/lib/assets/icons/unlink.svg +3 -0
  10. package/lib/components/base/Button.vue +21 -1
  11. package/lib/components/base/Checkbox.vue +89 -0
  12. package/lib/components/base/FieldLabel.vue +2 -1
  13. package/lib/components/base/Icon.vue +2 -2
  14. package/lib/components/base/Modal.vue +0 -1
  15. package/lib/components/base/TextField.vue +106 -0
  16. package/lib/components/base/__tests__/TextField.test.js +57 -0
  17. package/lib/components/base/__tests__/__snapshots__/TextField.test.js.snap +9 -0
  18. package/lib/components/base/composables/index.js +1 -0
  19. package/lib/components/base/composables/useValidator.js +19 -0
  20. package/lib/components/base/dropdown/Dropdown.vue +15 -3
  21. package/lib/components/base/dropdown/DropdownActivator.vue +19 -3
  22. package/lib/components/base/index.js +3 -1
  23. package/lib/components/toolbar/Toolbar.vue +48 -8
  24. package/lib/components/toolbar/ToolbarFull.vue +10 -2
  25. package/lib/components/toolbar/__tests__/Toolbar.test.js +6 -0
  26. package/lib/components/toolbar/controls/FontSizeControl.vue +7 -0
  27. package/lib/components/toolbar/controls/UnderlineControl.vue +2 -2
  28. package/lib/components/toolbar/controls/__tests__/UnderlineControl.test.js +4 -0
  29. package/lib/components/toolbar/controls/index.js +1 -0
  30. package/lib/components/toolbar/controls/link/LinkControl.vue +152 -0
  31. package/lib/components/toolbar/controls/link/LinkControlApply.vue +35 -0
  32. package/lib/components/toolbar/controls/link/LinkControlHeader.vue +67 -0
  33. package/lib/components/toolbar/controls/link/composables/index.js +1 -0
  34. package/lib/components/toolbar/controls/link/composables/useLink.js +61 -0
  35. package/lib/components/toolbar/controls/link/destination/LinkControlDestination.vue +103 -0
  36. package/lib/components/toolbar/controls/link/destination/LinkControlPageBlock.vue +54 -0
  37. package/lib/components/toolbar/controls/link/destination/LinkControlUrl.vue +52 -0
  38. package/lib/components/toolbar/controls/link/destination/index.js +1 -0
  39. package/lib/components/toolbar/controls/link/index.js +1 -0
  40. package/lib/composables/__tests__/useEditor.test.js +2 -2
  41. package/lib/composables/useEditor.js +4 -5
  42. package/lib/composables/useToolbar.js +15 -19
  43. package/lib/enums/LinkDestinations.js +4 -0
  44. package/lib/enums/LinkTargets.js +4 -0
  45. package/lib/enums/TextSettings.js +3 -1
  46. package/lib/enums/index.js +2 -0
  47. package/lib/extensions/Alignment.js +18 -6
  48. package/lib/extensions/BackgroundColor.js +14 -6
  49. package/lib/extensions/FontColor.js +14 -6
  50. package/lib/extensions/FontFamily.js +25 -8
  51. package/lib/extensions/FontSize.js +26 -13
  52. package/lib/extensions/FontStyle.js +23 -13
  53. package/lib/extensions/FontWeight.js +22 -14
  54. package/lib/extensions/LineHeight.js +11 -3
  55. package/lib/extensions/Link.js +101 -0
  56. package/lib/extensions/StylePreset.js +4 -2
  57. package/lib/extensions/TextDecoration.js +27 -12
  58. package/lib/extensions/__tests__/Alignment.test.js +11 -5
  59. package/lib/extensions/__tests__/BackgroundColor.test.js +11 -5
  60. package/lib/extensions/__tests__/CaseStyle.test.js +3 -5
  61. package/lib/extensions/__tests__/FontColor.test.js +11 -5
  62. package/lib/extensions/__tests__/FontFamily.test.js +32 -7
  63. package/lib/extensions/__tests__/FontSize.test.js +11 -5
  64. package/lib/extensions/__tests__/FontStyle.test.js +11 -5
  65. package/lib/extensions/__tests__/FontWeight.test.js +11 -5
  66. package/lib/extensions/__tests__/LineHeight.test.js +11 -5
  67. package/lib/extensions/__tests__/StylePreset.test.js +70 -6
  68. package/lib/extensions/__tests__/TextDecoration.test.js +27 -5
  69. package/lib/extensions/__tests__/__snapshots__/Alignment.test.js.snap +26 -2
  70. package/lib/extensions/__tests__/__snapshots__/BackgroundColor.test.js.snap +30 -1
  71. package/lib/extensions/__tests__/__snapshots__/FontColor.test.js.snap +18 -1
  72. package/lib/extensions/__tests__/__snapshots__/FontFamily.test.js.snap +88 -1
  73. package/lib/extensions/__tests__/__snapshots__/FontSize.test.js.snap +33 -2
  74. package/lib/extensions/__tests__/__snapshots__/FontStyle.test.js.snap +25 -4
  75. package/lib/extensions/__tests__/__snapshots__/FontWeight.test.js.snap +30 -1
  76. package/lib/extensions/__tests__/__snapshots__/LineHeight.test.js.snap +26 -2
  77. package/lib/extensions/__tests__/__snapshots__/StylePreset.test.js.snap +6 -2
  78. package/lib/extensions/__tests__/__snapshots__/TextDecoration.test.js.snap +93 -3
  79. package/lib/extensions/core/CopyPasteProcessor.js +10 -0
  80. package/lib/extensions/core/TextProcessor.js +10 -0
  81. package/lib/extensions/core/__tests__/NodeProcessor.test.js +3 -5
  82. package/lib/extensions/core/__tests__/SelectionProcessor.test.js +3 -5
  83. package/lib/extensions/core/__tests__/TextProcessor.test.js +138 -12
  84. package/lib/extensions/core/__tests__/__snapshots__/TextProcessor.test.js.snap +26 -0
  85. package/lib/extensions/core/index.js +11 -2
  86. package/lib/extensions/core/plugins/PastePlugin.js +48 -0
  87. package/lib/extensions/core/plugins/ProseMirrorPlugin.js +20 -0
  88. package/lib/extensions/core/plugins/index.js +1 -0
  89. package/lib/extensions/index.js +41 -34
  90. package/lib/extensions/list/__tests__/List.test.js +3 -5
  91. package/lib/extensions/list/__tests__/__snapshots__/List.test.js.snap +45 -15
  92. package/lib/injectionTokens.js +2 -1
  93. package/lib/services/ContentNormalizer.js +62 -20
  94. package/lib/services/__tests__/ContentNormalizer.test.js +40 -7
  95. package/lib/styles/content.css +96 -9
  96. package/lib/styles/helpers/offsets.css +16 -0
  97. package/lib/styles/variables.css +6 -0
  98. package/lib/utils/__tests__/__snapshots__/renderInlineSetting.test.js.snap +4 -4
  99. package/lib/utils/renderInlineSetting.js +1 -1
  100. package/package.json +11 -9
@@ -1,26 +1,36 @@
1
1
  import { ContextWindow } from './ContextWidnow';
2
2
 
3
3
  export class ContentNormalizer {
4
- static NORMALIZING_STYLE_BLACKLIST = ['text-align', 'line-height'];
4
+ static BLOCK_STYLES = ['text-align', 'line-height'];
5
5
 
6
- normalize(content) {
7
- if (typeof content !== 'string') return content;
6
+ static normalize(content) {
7
+ return new ContentNormalizer(content).normalize();
8
+ }
8
9
 
9
- return this._normalizeTextContent(content);
10
+ constructor(content) {
11
+ this._content = content;
12
+ this._dom = null;
10
13
  }
11
14
 
12
- _normalizeTextContent(content) {
13
- const parser = new DOMParser();
14
- const dom = parser.parseFromString(content, 'text/html');
15
+ normalize() {
16
+ if (typeof this._content !== 'string') {
17
+ return this._content;
18
+ }
19
+ return this._normalizeTextContent();
20
+ }
15
21
 
16
- this._iterateNodes(dom, this._normalizeStructure.bind(this), (node) => node.tagName === 'SPAN');
17
- this._iterateNodes(dom, this._normalizeStyles.bind(this), (node) => node.tagName !== 'SPAN');
22
+ _normalizeTextContent() {
23
+ this._dom = new DOMParser().parseFromString(this._content, 'text/html');
18
24
 
19
- return dom.body.innerHTML;
25
+ this._iterateNodes(this._normalizeListItems.bind(this), (node) => node.tagName === 'LI');
26
+ this._iterateNodes(this._normalizeSettingsStructure.bind(this), (node) => node.tagName === 'SPAN');
27
+ this._iterateNodes(this._normalizeStyles.bind(this), (node) => node.tagName !== 'SPAN');
28
+
29
+ return this._dom.body.innerHTML;
20
30
  }
21
31
 
22
- _iterateNodes(dom, handler, condition) {
23
- const iterator = dom.createNodeIterator(dom.body, NodeFilter.SHOW_ELEMENT, {
32
+ _iterateNodes(handler, condition) {
33
+ const iterator = this._dom.createNodeIterator(this._dom.body, NodeFilter.SHOW_ELEMENT, {
24
34
  acceptNode: (node) => condition(node) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT
25
35
  });
26
36
  let currentNode = iterator.nextNode();
@@ -31,14 +41,43 @@ export class ContentNormalizer {
31
41
  }
32
42
  }
33
43
 
34
- _normalizeStructure(element) {
44
+ _normalizeListItems(itemEl) {
45
+ const fragment = new DocumentFragment();
46
+ const children = Array.from(itemEl.childNodes);
47
+ let capturingParagraph;
48
+
49
+ const append = (node) => {
50
+ this._assignElementProperties(node, itemEl, ContentNormalizer.BLOCK_STYLES);
51
+ fragment.append(node);
52
+ };
53
+
54
+ for (const node of children) {
55
+ if (node.tagName === 'P') {
56
+ append(node);
57
+ capturingParagraph = null;
58
+ continue;
59
+ }
60
+
61
+ if (!capturingParagraph) {
62
+ capturingParagraph = document.createElement('p');
63
+ append(capturingParagraph);
64
+ }
65
+
66
+ capturingParagraph.append(node);
67
+ }
68
+
69
+ itemEl.append(fragment);
70
+ this._removeStyleProperties(itemEl, ContentNormalizer.BLOCK_STYLES);
71
+ }
72
+
73
+ _normalizeSettingsStructure(element) {
35
74
  const isTextChildren = Array.from(element.childNodes)
36
75
  .every((node) => node.nodeType === Node.TEXT_NODE);
37
76
 
38
77
  if (isTextChildren) return;
39
78
 
40
79
  const cloned = element.cloneNode(true);
41
- const migratingStyles = this._getMigratingStyles(element);
80
+ const migratingStyles = this._getMigratingStyles(element, { customProperties: true });
42
81
  const content = [];
43
82
 
44
83
  for (const node of cloned.childNodes) {
@@ -67,16 +106,17 @@ export class ContentNormalizer {
67
106
  this._removeStyleProperties(element, properties);
68
107
  }
69
108
 
70
- _getMigratingStyles(element) {
71
- const blacklist = ContentNormalizer.NORMALIZING_STYLE_BLACKLIST;
109
+ _getMigratingStyles(element, { customProperties } = {}) {
110
+ const blacklist = ContentNormalizer.BLOCK_STYLES;
72
111
  const properties = [];
73
112
 
74
113
  for (let index = 0; index < element.style.length; index++) {
75
114
  const property = element.style.item(index);
76
115
 
77
- if (!blacklist.includes(property)) {
78
- properties.push(property);
79
- }
116
+ if (blacklist.includes(property)) continue;
117
+ if (!customProperties && property.startsWith('--')) continue;
118
+
119
+ properties.push(property);
80
120
  }
81
121
 
82
122
  return properties;
@@ -99,7 +139,9 @@ export class ContentNormalizer {
99
139
  continue;
100
140
  }
101
141
 
102
- target.style.setProperty(property, source.style.getPropertyValue(property));
142
+ const value = source.style.getPropertyValue(property);
143
+
144
+ if (value) target.style.setProperty(property, value);
103
145
  }
104
146
  }
105
147
 
@@ -1,13 +1,11 @@
1
1
  import { ContentNormalizer } from '../ContentNormalizer';
2
2
  import { NodeFactory } from '../../__tests__/utils';
3
3
 
4
- const normalize = (content) => new ContentNormalizer().normalize(content);
5
-
6
- describe('normalize text settings', () => {
4
+ describe('normalize text content', () => {
7
5
  test('should ignore json content', () => {
8
6
  const content = NodeFactory.doc([NodeFactory.paragraph('Test')]);
9
7
 
10
- expect(normalize(content)).toBe(content);
8
+ expect(ContentNormalizer.normalize(content)).toBe(content);
11
9
  });
12
10
 
13
11
  test('should flat structure', () => {
@@ -18,14 +16,14 @@ describe('normalize text settings', () => {
18
16
  '<span style="background-color: rgb(255, 0, 0); color: rgb(255, 255, 255);">sum</span>' +
19
17
  '</p>';
20
18
 
21
- expect(normalize(input)).toBe(output);
19
+ expect(ContentNormalizer.normalize(input)).toBe(output);
22
20
  });
23
21
 
24
22
  test('should move styles from paragraph to text', () => {
25
23
  const input = '<p style="background-color: red;">lorem ipsum</p>';
26
24
  const output = '<p><span style="background-color: red;">lorem ipsum</span></p>';
27
25
 
28
- expect(normalize(input)).toBe(output);
26
+ expect(ContentNormalizer.normalize(input)).toBe(output);
29
27
  });
30
28
 
31
29
  test('should move styles from paragraph to unstyled text', () => {
@@ -36,6 +34,41 @@ describe('normalize text settings', () => {
36
34
  '<span style="color: white; background-color: red;">one</span' +
37
35
  '></p>';
38
36
 
39
- expect(normalize(input)).toBe(output);
37
+ expect(ContentNormalizer.normalize(input)).toBe(output);
38
+ });
39
+
40
+ test('should wrap list content in paragraph', () => {
41
+ const input = '<ul><li style="line-height: 2;">lorem impsum</li></ul>';
42
+ const output = '<ul><li><p style="line-height: 2;"><span>lorem impsum</span></p></li></ul>';
43
+
44
+ expect(ContentNormalizer.normalize(input)).toBe(output);
45
+ });
46
+
47
+ test('should keep order in list nodes', () => {
48
+ const input = '<ul><li style="line-height: 2;"><span style="font-weight: 700">lorem</span> impsum</li></ul>';
49
+ const output = '<ul>' +
50
+ '<li>' +
51
+ '<p style="line-height: 2;"><span style="font-weight: 700">lorem</span><span> impsum</span></p>' +
52
+ '</li>' +
53
+ '</ul>';
54
+
55
+ expect(ContentNormalizer.normalize(input)).toBe(output);
56
+ });
57
+
58
+ test('should wrap non paragraph list content', () => {
59
+ const input = '<ul>' +
60
+ '<li style="line-height: 2;">' +
61
+ '<span style="font-weight: 700">lorem</span> impsum' +
62
+ '<p>paragraph text</p>' +
63
+ '</li>' +
64
+ '</ul>';
65
+ const output = '<ul>' +
66
+ '<li>' +
67
+ '<p style="line-height: 2;"><span style="font-weight: 700">lorem</span><span> impsum</span></p>' +
68
+ '<p style="line-height: 2;"><span>paragraph text</span></p>' +
69
+ '</li>' +
70
+ '</ul>';
71
+
72
+ expect(ContentNormalizer.normalize(input)).toBe(output);
40
73
  });
41
74
  });
@@ -2,6 +2,14 @@
2
2
  outline: none;
3
3
  }
4
4
 
5
+ .zw-wysiwyg__placeholder:first-child:last-child::before {
6
+ content: attr(data-placeholder);
7
+ color: rgb(var(--zw-color-n70));
8
+ float: left;
9
+ height: 0;
10
+ pointer-events: none;
11
+ }
12
+
5
13
  .zw-style {
6
14
  font-weight: var(--zw-font-weight, var(--zw-preset-font-weight));
7
15
  font-family: var(--zw-font-family, var(--zw-preset-font-family));
@@ -14,26 +22,105 @@
14
22
  @media (min-width: 1200px) {
15
23
 
16
24
  .zw-style {
17
- font-size: var(--zw-desktop-font-size, var(--zw-preset-desktop-font-size));
18
- text-align: var(--zw-desktop-text-align, var(--zw-preset-desktop-text-align));
19
- line-height: var(--zw-desktop-line-height, var(--zw-preset-desktop-line-height));
25
+ font-size: var(--zw-font-size-desktop, var(--zw-preset-desktop-font-size));
26
+ text-align: var(--zw-text-align-desktop, var(--zw-preset-desktop-text-align));
27
+ line-height: var(--zw-line-height-desktop, var(--zw-preset-desktop-line-height));
20
28
  }
21
29
  }
22
30
 
23
31
  @media (min-width: 769px) and (max-width: 1199.98px) {
24
32
 
25
33
  .zw-style {
26
- font-size: var(--zw-tablet-font-size, var(--zw-preset-tablet-font-size));
27
- text-align: var(--zw-tablet-text-align, var(--zw-preset-tablet-text-align));
28
- line-height: var(--zw-tablet-line-height, var(--zw-preset-tablet-line-height));
34
+ font-size: var(--zw-font-size-tablet, var(--zw-preset-tablet-font-size));
35
+ text-align: var(--zw-text-align-tablet, var(--zw-preset-tablet-text-align));
36
+ line-height: var(--zw-line-height-tablet, var(--zw-preset-tablet-line-height));
29
37
  }
30
38
  }
31
39
 
32
40
  @media (max-width: 768.98px) {
33
41
 
34
42
  .zw-style {
35
- font-size: var(--zw-mobile-font-size, var(--zw-preset-mobile-font-size));
36
- text-align: var(--zw-mobile-text-align, var(--zw-preset-mobile-text-align));
37
- line-height: var(--zw-mobile-line-height, var(--zw-preset-mobile-line-height));
43
+ font-size: var(--zw-font-size-mobile, var(--zw-preset-mobile-font-size));
44
+ text-align: var(--zw-text-align-mobile, var(--zw-preset-mobile-text-align));
45
+ line-height: var(--zw-line-height-mobile, var(--zw-preset-mobile-line-height));
38
46
  }
39
47
  }
48
+
49
+ /* ProseMirror styles */
50
+
51
+ .ProseMirror {
52
+ position: relative;
53
+ }
54
+
55
+ .ProseMirror {
56
+ word-wrap: break-word;
57
+ white-space: pre-wrap;
58
+ white-space: break-spaces;
59
+ -webkit-font-variant-ligatures: none;
60
+ font-variant-ligatures: none;
61
+ font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
62
+ }
63
+
64
+ .ProseMirror [contenteditable="false"] {
65
+ white-space: normal;
66
+ }
67
+
68
+ .ProseMirror [contenteditable="false"] [contenteditable="true"] {
69
+ white-space: pre-wrap;
70
+ }
71
+
72
+ .ProseMirror pre {
73
+ white-space: pre-wrap;
74
+ }
75
+
76
+ img.ProseMirror-separator {
77
+ display: inline !important;
78
+ border: none !important;
79
+ margin: 0 !important;
80
+ width: 1px !important;
81
+ height: 1px !important;
82
+ }
83
+
84
+ .ProseMirror-gapcursor {
85
+ display: none;
86
+ pointer-events: none;
87
+ position: absolute;
88
+ margin: 0;
89
+ }
90
+
91
+ .ProseMirror-gapcursor::after {
92
+ content: "";
93
+ display: block;
94
+ position: absolute;
95
+ top: -2px;
96
+ width: 20px;
97
+ border-top: 1px solid #000;
98
+ animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
99
+ }
100
+
101
+ @keyframes ProseMirror-cursor-blink {
102
+
103
+ to {
104
+ visibility: hidden;
105
+ }
106
+ }
107
+
108
+ .ProseMirror-hideselection *::selection {
109
+ background: transparent;
110
+ }
111
+
112
+ .ProseMirror-hideselection *::-moz-selection {
113
+ background: transparent;
114
+ }
115
+
116
+ .ProseMirror-hideselection * {
117
+ caret-color: transparent;
118
+ }
119
+
120
+ .ProseMirror-focused .ProseMirror-gapcursor {
121
+ display: block;
122
+ }
123
+
124
+ .tippy-box[data-animation=fade][data-state=hidden] {
125
+ opacity: 0
126
+ }
@@ -1,3 +1,19 @@
1
+ .zw-margin-bottom--xxs {
2
+ margin-bottom: var(--zw-offset-xxs);
3
+ }
4
+
1
5
  .zw-margin-bottom--xs {
2
6
  margin-bottom: var(--zw-offset-xs);
3
7
  }
8
+
9
+ .zw-margin-bottom--sm {
10
+ margin-bottom: var(--zw-offset-sm);
11
+ }
12
+
13
+ .zw-margin-bottom--md {
14
+ margin-bottom: var(--zw-offset-md);
15
+ }
16
+
17
+ .zw-margin-right--xs {
18
+ margin-right: var(--zw-offset-xs);
19
+ }
@@ -8,13 +8,17 @@
8
8
  --zw-color-n80: 196, 196, 196; /* #C4C4C4 */
9
9
  --zw-color-n85: 217, 217, 217; /* #D9D9D9 */
10
10
  --zw-color-n90: 230, 230, 230; /* #E6E6E6 */
11
+ --zw-color-n200: 194, 200, 209; /* #C2C8D1 */
11
12
  --zw-color-black: 0, 0, 0;
12
13
  --zw-color-white: 255, 255, 255;
14
+ --zw-color-green: 59, 180, 74; /* #3BB44A */
15
+ --zw-color-red: 234, 58, 58; /* #EA3A3A */
13
16
 
14
17
  --zw-offset-xxs: 4px;
15
18
  --zw-offset-xs: 8px;
16
19
  --zw-offset-xsm: 12px;
17
20
  --zw-offset-sm: 16px;
21
+ --zw-offset-md: 24px;
18
22
 
19
23
  --zw-font-weight-thin: 400;
20
24
  --zw-font-weight-semibold: 500;
@@ -42,6 +46,8 @@ $builder-N90: #E6E6E6;
42
46
  $builder-N94: #F0F0F0;
43
47
  $builder-N96: #F5F5F5;
44
48
  $builder-N98: #FAFAFA;
49
+ $builder-N200: #C2C8D1;
50
+ $builder-R50: #EA3A3A;
45
51
 
46
52
  $font-size-xxs: 12px;
47
53
  $font-size-xs: 14px;
@@ -5,7 +5,7 @@ Array [
5
5
  "span",
6
6
  Object {
7
7
  "class": "zw-style",
8
- "style": "--zw-mobile-font-size: 12px; --zw-tablet-font-size: 14px; --zw-desktop-font-size: 16px;",
8
+ "style": "--zw-mobile-font-size:12px;--zw-tablet-font-size:14px;--zw-desktop-font-size:16px;",
9
9
  },
10
10
  0,
11
11
  ]
@@ -16,7 +16,7 @@ Array [
16
16
  "span",
17
17
  Object {
18
18
  "class": "zw-style",
19
- "style": "--zw-desktop-font-size: 16px;",
19
+ "style": "--zw-desktop-font-size:16px;",
20
20
  },
21
21
  0,
22
22
  ]
@@ -27,7 +27,7 @@ Array [
27
27
  "span",
28
28
  Object {
29
29
  "class": "zw-style",
30
- "style": "--zw-font-size: 12px;",
30
+ "style": "--zw-font-size:12px;",
31
31
  },
32
32
  0,
33
33
  ]
@@ -35,6 +35,6 @@ Array [
35
35
 
36
36
  exports[`render settings should render unwrapped styles 1`] = `
37
37
  Object {
38
- "style": "--zw-desktop-font-size: 16px;",
38
+ "style": "--zw-desktop-font-size:16px;",
39
39
  }
40
40
  `;
@@ -4,7 +4,7 @@ export function renderInlineSetting(setting) {
4
4
 
5
5
  const property = name.replace(/_/g, '-');
6
6
 
7
- return `${css} --zw-${property}: ${value};`.trimStart();
7
+ return `${css}--zw-${property}:${value};`;
8
8
  }, '');
9
9
 
10
10
  return style ? { style } : null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zipify/wysiwyg",
3
- "version": "1.0.0-dev.16",
3
+ "version": "1.0.0-dev.19",
4
4
  "description": "Zipify modification of TipTap text editor",
5
5
  "main": "dist/wysiwyg.js",
6
6
  "repository": {
@@ -29,8 +29,10 @@
29
29
  "@tiptap/extension-document": "^2.0.0-beta.17",
30
30
  "@tiptap/extension-heading": "^2.0.0-beta.29",
31
31
  "@tiptap/extension-history": "^2.0.0-beta.26",
32
+ "@tiptap/extension-link": "^2.0.0-beta.43",
32
33
  "@tiptap/extension-list-item": "^2.0.0-beta.23",
33
34
  "@tiptap/extension-paragraph": "^2.0.0-beta.26",
35
+ "@tiptap/extension-placeholder": "^2.0.0-beta.53",
34
36
  "@tiptap/extension-superscript": "^2.0.0-beta.13",
35
37
  "@tiptap/extension-text": "^2.0.0-beta.17",
36
38
  "@tiptap/vue-2": "^2.0.0-beta.84",
@@ -41,20 +43,20 @@
41
43
  "zipify-colorpicker": "*"
42
44
  },
43
45
  "devDependencies": {
44
- "@babel/core": "^7.18.6",
45
- "@babel/eslint-parser": "^7.18.2",
46
- "@babel/plugin-transform-runtime": "^7.18.6",
47
- "@babel/preset-env": "^7.18.6",
48
- "@babel/runtime": "^7.18.6",
46
+ "@babel/core": "^7.18.9",
47
+ "@babel/eslint-parser": "^7.18.9",
48
+ "@babel/plugin-transform-runtime": "^7.18.9",
49
+ "@babel/preset-env": "^7.18.9",
50
+ "@babel/runtime": "^7.18.9",
49
51
  "@vue/composition-api": "^1.7.0",
50
52
  "@vue/test-utils": "^1.3.0",
51
53
  "@vue/vue2-jest": "^28.0.1",
52
- "babel-jest": "^28.1.2",
54
+ "babel-jest": "^28.1.3",
53
55
  "babel-loader": "^8.2.5",
54
56
  "css-loader": "^6.7.1",
55
57
  "eslint": "^8.20.0",
56
58
  "eslint-plugin-import": "^2.26.0",
57
- "eslint-plugin-vue": "^9.2.0",
59
+ "eslint-plugin-vue": "^9.3.0",
58
60
  "gzipper": "^7.1.0",
59
61
  "html-webpack-plugin": "^5.5.0",
60
62
  "husky": "^8.0.1",
@@ -70,7 +72,7 @@
70
72
  "vue": "^2.6.14",
71
73
  "vue-loader": "^15.9.8",
72
74
  "vue-template-compiler": "^2.6.14",
73
- "webpack": "^5.73.0",
75
+ "webpack": "^5.74.0",
74
76
  "webpack-bundle-analyzer": "^4.5.0",
75
77
  "webpack-cli": "^4.10.0",
76
78
  "webpack-dev-server": "^4.9.3",