@zipify/wysiwyg 1.0.0-dev.2 → 1.0.0-dev.22

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 (150) hide show
  1. package/.eslintignore +1 -0
  2. package/.github/dependabot.yaml +1 -0
  3. package/.release-it.json +3 -1
  4. package/.stylelintignore +1 -0
  5. package/README.md +3 -1
  6. package/config/jest/setupTests.js +7 -1
  7. package/config/webpack/example.config.js +2 -0
  8. package/config/webpack/lib.config.js +44 -0
  9. package/config/webpack/loaders/style-loader.js +3 -1
  10. package/config/webpack/loaders/svg-loader.js +1 -1
  11. package/dist/wysiwyg.css +1226 -0
  12. package/dist/wysiwyg.js +7024 -0
  13. package/example/ExampleApp.vue +51 -32
  14. package/example/example.js +26 -0
  15. package/example/pageBlocks.js +31 -0
  16. package/example/presets.js +4 -2
  17. package/lib/Wysiwyg.vue +41 -21
  18. package/lib/assets/icons/alignment-center.svg +3 -0
  19. package/lib/assets/icons/alignment-justify.svg +3 -0
  20. package/lib/assets/icons/alignment-left.svg +3 -0
  21. package/lib/assets/icons/alignment-right.svg +3 -0
  22. package/lib/assets/icons/arrow.svg +3 -0
  23. package/lib/assets/icons/background-color.svg +3 -0
  24. package/lib/assets/icons/case-style.svg +3 -0
  25. package/lib/assets/icons/font-color.svg +5 -0
  26. package/lib/assets/icons/italic.svg +3 -0
  27. package/lib/assets/icons/line-height.svg +3 -0
  28. package/lib/assets/icons/link.svg +3 -0
  29. package/lib/assets/icons/list-circle.svg +3 -0
  30. package/lib/assets/icons/list-decimal.svg +3 -0
  31. package/lib/assets/icons/list-disc.svg +3 -0
  32. package/lib/assets/icons/list-latin.svg +3 -0
  33. package/lib/assets/icons/list-roman.svg +3 -0
  34. package/lib/assets/icons/list-square.svg +3 -0
  35. package/lib/assets/icons/remove-format.svg +3 -0
  36. package/lib/assets/icons/reset-styles.svg +3 -0
  37. package/lib/assets/icons/strike-through.svg +3 -0
  38. package/lib/assets/icons/superscript.svg +3 -0
  39. package/lib/assets/icons/underline.svg +3 -0
  40. package/lib/assets/icons/unlink.svg +3 -0
  41. package/lib/components/base/Button.vue +21 -1
  42. package/lib/components/base/Checkbox.vue +89 -0
  43. package/lib/components/base/FieldLabel.vue +2 -1
  44. package/lib/components/base/Icon.vue +18 -10
  45. package/lib/components/base/Modal.vue +0 -1
  46. package/lib/components/base/TextField.vue +106 -0
  47. package/lib/components/base/__tests__/Icon.test.js +6 -13
  48. package/lib/components/base/__tests__/TextField.test.js +57 -0
  49. package/lib/components/base/__tests__/__snapshots__/TextField.test.js.snap +9 -0
  50. package/lib/components/base/colorPicker/composables/usePickerHotkeys.js +2 -1
  51. package/lib/components/base/composables/index.js +1 -0
  52. package/lib/components/base/composables/useValidator.js +19 -0
  53. package/lib/components/base/dropdown/Dropdown.vue +15 -3
  54. package/lib/components/base/dropdown/DropdownActivator.vue +19 -3
  55. package/lib/components/base/index.js +3 -1
  56. package/lib/components/toolbar/Toolbar.vue +49 -9
  57. package/lib/components/toolbar/ToolbarFull.vue +10 -2
  58. package/lib/components/toolbar/__tests__/Toolbar.test.js +6 -0
  59. package/lib/components/toolbar/controls/FontSizeControl.vue +7 -0
  60. package/lib/components/toolbar/controls/ListControl.vue +1 -5
  61. package/lib/components/toolbar/controls/UnderlineControl.vue +2 -2
  62. package/lib/components/toolbar/controls/__tests__/UnderlineControl.test.js +4 -0
  63. package/lib/components/toolbar/controls/index.js +1 -0
  64. package/lib/components/toolbar/controls/link/LinkControl.vue +152 -0
  65. package/lib/components/toolbar/controls/link/LinkControlApply.vue +35 -0
  66. package/lib/components/toolbar/controls/link/LinkControlHeader.vue +67 -0
  67. package/lib/components/toolbar/controls/link/composables/index.js +1 -0
  68. package/lib/components/toolbar/controls/link/composables/useLink.js +61 -0
  69. package/lib/components/toolbar/controls/link/destination/LinkControlDestination.vue +103 -0
  70. package/lib/components/toolbar/controls/link/destination/LinkControlPageBlock.vue +54 -0
  71. package/lib/components/toolbar/controls/link/destination/LinkControlUrl.vue +52 -0
  72. package/lib/components/toolbar/controls/link/destination/index.js +1 -0
  73. package/lib/components/toolbar/controls/link/index.js +1 -0
  74. package/lib/composables/__tests__/useEditor.test.js +14 -5
  75. package/lib/composables/useEditor.js +13 -8
  76. package/lib/composables/useToolbar.js +14 -29
  77. package/lib/directives/outClick.js +20 -4
  78. package/lib/enums/LinkDestinations.js +4 -0
  79. package/lib/enums/LinkTargets.js +4 -0
  80. package/lib/enums/TextSettings.js +3 -1
  81. package/lib/enums/index.js +2 -0
  82. package/lib/extensions/Alignment.js +21 -3
  83. package/lib/extensions/BackgroundColor.js +16 -1
  84. package/lib/extensions/FontColor.js +16 -1
  85. package/lib/extensions/FontFamily.js +26 -2
  86. package/lib/extensions/FontSize.js +28 -3
  87. package/lib/extensions/FontStyle.js +23 -2
  88. package/lib/extensions/FontWeight.js +33 -1
  89. package/lib/extensions/LineHeight.js +29 -3
  90. package/lib/extensions/Link.js +101 -0
  91. package/lib/extensions/StylePreset.js +36 -6
  92. package/lib/extensions/TextDecoration.js +29 -3
  93. package/lib/extensions/__tests__/Alignment.test.js +30 -3
  94. package/lib/extensions/__tests__/BackgroundColor.test.js +38 -3
  95. package/lib/extensions/__tests__/CaseStyle.test.js +4 -3
  96. package/lib/extensions/__tests__/FontColor.test.js +38 -3
  97. package/lib/extensions/__tests__/FontFamily.test.js +59 -5
  98. package/lib/extensions/__tests__/FontSize.test.js +38 -3
  99. package/lib/extensions/__tests__/FontStyle.test.js +46 -3
  100. package/lib/extensions/__tests__/FontWeight.test.js +66 -3
  101. package/lib/extensions/__tests__/LineHeight.test.js +49 -3
  102. package/lib/extensions/__tests__/StylePreset.test.js +143 -4
  103. package/lib/extensions/__tests__/TextDecoration.test.js +87 -3
  104. package/lib/extensions/__tests__/__snapshots__/Alignment.test.js.snap +70 -2
  105. package/lib/extensions/__tests__/__snapshots__/BackgroundColor.test.js.snap +121 -1
  106. package/lib/extensions/__tests__/__snapshots__/FontColor.test.js.snap +109 -1
  107. package/lib/extensions/__tests__/__snapshots__/FontFamily.test.js.snap +179 -1
  108. package/lib/extensions/__tests__/__snapshots__/FontSize.test.js.snap +132 -2
  109. package/lib/extensions/__tests__/__snapshots__/FontStyle.test.js.snap +142 -1
  110. package/lib/extensions/__tests__/__snapshots__/FontWeight.test.js.snap +179 -1
  111. package/lib/extensions/__tests__/__snapshots__/LineHeight.test.js.snap +118 -2
  112. package/lib/extensions/__tests__/__snapshots__/StylePreset.test.js.snap +171 -2
  113. package/lib/extensions/__tests__/__snapshots__/TextDecoration.test.js.snap +300 -3
  114. package/lib/extensions/core/CopyPasteProcessor.js +10 -0
  115. package/lib/extensions/core/TextProcessor.js +10 -0
  116. package/lib/extensions/core/__tests__/NodeProcessor.test.js +4 -3
  117. package/lib/extensions/core/__tests__/SelectionProcessor.test.js +9 -6
  118. package/lib/extensions/core/__tests__/TextProcessor.test.js +139 -10
  119. package/lib/extensions/core/__tests__/__snapshots__/TextProcessor.test.js.snap +26 -0
  120. package/lib/extensions/core/index.js +11 -2
  121. package/lib/extensions/core/plugins/PastePlugin.js +48 -0
  122. package/lib/extensions/core/plugins/ProseMirrorPlugin.js +20 -0
  123. package/lib/extensions/core/plugins/index.js +1 -0
  124. package/lib/extensions/index.js +41 -33
  125. package/lib/extensions/list/List.js +34 -0
  126. package/lib/extensions/list/__tests__/List.test.js +115 -5
  127. package/lib/extensions/list/__tests__/__snapshots__/List.test.js.snap +481 -0
  128. package/lib/injectionTokens.js +2 -1
  129. package/lib/services/ContentNormalizer.js +157 -0
  130. package/lib/services/ContextWidnow.js +23 -0
  131. package/lib/services/Storage.js +1 -13
  132. package/lib/services/__tests__/ContentNormalizer.test.js +74 -0
  133. package/lib/services/__tests__/FavoriteColors.test.js +20 -0
  134. package/lib/services/__tests__/JsonSerializer.test.js +23 -0
  135. package/lib/services/__tests__/Storage.test.js +79 -0
  136. package/lib/services/index.js +2 -0
  137. package/lib/styles/content.css +96 -9
  138. package/lib/styles/helpers/offsets.css +16 -0
  139. package/lib/styles/variables.css +6 -0
  140. package/lib/utils/__tests__/__snapshots__/renderInlineSetting.test.js.snap +4 -4
  141. package/lib/utils/__tests__/convertColor.test.js +19 -0
  142. package/lib/utils/__tests__/createKeyboardShortcut.test.js +25 -0
  143. package/lib/utils/__tests__/renderInlineSetting.test.js +26 -0
  144. package/lib/utils/convertColor.js +7 -0
  145. package/lib/utils/importIcon.js +12 -0
  146. package/lib/utils/index.js +2 -0
  147. package/lib/utils/renderInlineSetting.js +2 -2
  148. package/package.json +18 -14
  149. package/lib/assets/icons.svg +0 -69
  150. package/lib/composables/__tests__/useToolbar.test.js +0 -56
@@ -155,4 +155,182 @@ Object {
155
155
  }
156
156
  `;
157
157
 
158
- exports[`rendering should render html 1`] = `"<p class=\\"zw-style\\"><span style=\\"--zw-font-family: Bungee;\\" class=\\"zw-style\\">hello world</span></p>"`;
158
+ exports[`parsing html should get parse font name with quotes 1`] = `
159
+ Object {
160
+ "content": Array [
161
+ Object {
162
+ "content": Array [
163
+ Object {
164
+ "text": "hello ",
165
+ "type": "text",
166
+ },
167
+ Object {
168
+ "marks": Array [
169
+ Object {
170
+ "attrs": Object {
171
+ "value": "Josefin Slab",
172
+ },
173
+ "type": "font_family",
174
+ },
175
+ ],
176
+ "text": "world",
177
+ "type": "text",
178
+ },
179
+ ],
180
+ "type": "paragraph",
181
+ },
182
+ ],
183
+ "type": "doc",
184
+ }
185
+ `;
186
+
187
+ exports[`parsing html should get set default if undefined font 1`] = `
188
+ Object {
189
+ "content": Array [
190
+ Object {
191
+ "content": Array [
192
+ Object {
193
+ "marks": Array [
194
+ Object {
195
+ "attrs": Object {
196
+ "value": "Lato",
197
+ },
198
+ "type": "font_family",
199
+ },
200
+ ],
201
+ "text": "lorem",
202
+ "type": "text",
203
+ },
204
+ Object {
205
+ "text": " ipsum",
206
+ "type": "text",
207
+ },
208
+ ],
209
+ "type": "paragraph",
210
+ },
211
+ ],
212
+ "type": "doc",
213
+ }
214
+ `;
215
+
216
+ exports[`parsing html should get value from paragraph 1`] = `
217
+ Object {
218
+ "content": Array [
219
+ Object {
220
+ "content": Array [
221
+ Object {
222
+ "marks": Array [
223
+ Object {
224
+ "attrs": Object {
225
+ "value": "Lato",
226
+ },
227
+ "type": "font_family",
228
+ },
229
+ ],
230
+ "text": "test",
231
+ "type": "text",
232
+ },
233
+ ],
234
+ "type": "paragraph",
235
+ },
236
+ ],
237
+ "type": "doc",
238
+ }
239
+ `;
240
+
241
+ exports[`parsing html should get value from rendered view 1`] = `
242
+ Object {
243
+ "content": Array [
244
+ Object {
245
+ "content": Array [
246
+ Object {
247
+ "marks": Array [
248
+ Object {
249
+ "attrs": Object {
250
+ "value": "Lato",
251
+ },
252
+ "type": "font_family",
253
+ },
254
+ ],
255
+ "text": "lorem",
256
+ "type": "text",
257
+ },
258
+ Object {
259
+ "text": " ipsum",
260
+ "type": "text",
261
+ },
262
+ ],
263
+ "type": "paragraph",
264
+ },
265
+ ],
266
+ "type": "doc",
267
+ }
268
+ `;
269
+
270
+ exports[`parsing html should get value from text 1`] = `
271
+ Object {
272
+ "content": Array [
273
+ Object {
274
+ "content": Array [
275
+ Object {
276
+ "marks": Array [
277
+ Object {
278
+ "attrs": Object {
279
+ "value": "Lato",
280
+ },
281
+ "type": "font_family",
282
+ },
283
+ ],
284
+ "text": "lorem",
285
+ "type": "text",
286
+ },
287
+ Object {
288
+ "text": " ipsum",
289
+ "type": "text",
290
+ },
291
+ ],
292
+ "type": "paragraph",
293
+ },
294
+ ],
295
+ "type": "doc",
296
+ }
297
+ `;
298
+
299
+ exports[`parsing html should merge paragraph and text settings 1`] = `
300
+ Object {
301
+ "content": Array [
302
+ Object {
303
+ "content": Array [
304
+ Object {
305
+ "marks": Array [
306
+ Object {
307
+ "attrs": Object {
308
+ "value": "Roboto",
309
+ },
310
+ "type": "font_family",
311
+ },
312
+ ],
313
+ "text": "lorem",
314
+ "type": "text",
315
+ },
316
+ Object {
317
+ "marks": Array [
318
+ Object {
319
+ "attrs": Object {
320
+ "value": "Lato",
321
+ },
322
+ "type": "font_family",
323
+ },
324
+ ],
325
+ "text": " ipsum",
326
+ "type": "text",
327
+ },
328
+ ],
329
+ "type": "paragraph",
330
+ },
331
+ ],
332
+ "type": "doc",
333
+ }
334
+ `;
335
+
336
+ exports[`rendering should render html 1`] = `"<p class=\\"zw-style\\"><span style=\\"--zw-font-family:&quot;Bungee&quot;;\\" class=\\"zw-style\\">hello world</span></p>"`;
@@ -135,6 +135,136 @@ Object {
135
135
  }
136
136
  `;
137
137
 
138
- exports[`rendering should render all devices 1`] = `"<p class=\\"zw-style\\"><span style=\\"--zw-mobile-font-size: 12px; --zw-tablet-font-size: 14px; --zw-desktop-font-size: 16px;\\" class=\\"zw-style\\">hello world</span></p>"`;
138
+ exports[`parsing html should get value from paragraph 1`] = `
139
+ Object {
140
+ "content": Array [
141
+ Object {
142
+ "content": Array [
143
+ Object {
144
+ "marks": Array [
145
+ Object {
146
+ "attrs": Object {
147
+ "desktop": "24",
148
+ "mobile": "24",
149
+ "tablet": "24",
150
+ },
151
+ "type": "font_size",
152
+ },
153
+ ],
154
+ "text": "test",
155
+ "type": "text",
156
+ },
157
+ ],
158
+ "type": "paragraph",
159
+ },
160
+ ],
161
+ "type": "doc",
162
+ }
163
+ `;
164
+
165
+ exports[`parsing html should get value from rendered view 1`] = `
166
+ Object {
167
+ "content": Array [
168
+ Object {
169
+ "content": Array [
170
+ Object {
171
+ "marks": Array [
172
+ Object {
173
+ "attrs": Object {
174
+ "desktop": "30",
175
+ "mobile": "24",
176
+ "tablet": null,
177
+ },
178
+ "type": "font_size",
179
+ },
180
+ ],
181
+ "text": "lorem",
182
+ "type": "text",
183
+ },
184
+ Object {
185
+ "text": " ipsum",
186
+ "type": "text",
187
+ },
188
+ ],
189
+ "type": "paragraph",
190
+ },
191
+ ],
192
+ "type": "doc",
193
+ }
194
+ `;
195
+
196
+ exports[`parsing html should get value from text 1`] = `
197
+ Object {
198
+ "content": Array [
199
+ Object {
200
+ "content": Array [
201
+ Object {
202
+ "marks": Array [
203
+ Object {
204
+ "attrs": Object {
205
+ "desktop": "24",
206
+ "mobile": "24",
207
+ "tablet": "24",
208
+ },
209
+ "type": "font_size",
210
+ },
211
+ ],
212
+ "text": "lorem",
213
+ "type": "text",
214
+ },
215
+ Object {
216
+ "text": " ipsum",
217
+ "type": "text",
218
+ },
219
+ ],
220
+ "type": "paragraph",
221
+ },
222
+ ],
223
+ "type": "doc",
224
+ }
225
+ `;
226
+
227
+ exports[`parsing html should merge paragraph and text settings 1`] = `
228
+ Object {
229
+ "content": Array [
230
+ Object {
231
+ "content": Array [
232
+ Object {
233
+ "marks": Array [
234
+ Object {
235
+ "attrs": Object {
236
+ "desktop": "20",
237
+ "mobile": "20",
238
+ "tablet": "20",
239
+ },
240
+ "type": "font_size",
241
+ },
242
+ ],
243
+ "text": "lorem",
244
+ "type": "text",
245
+ },
246
+ Object {
247
+ "marks": Array [
248
+ Object {
249
+ "attrs": Object {
250
+ "desktop": "24",
251
+ "mobile": "24",
252
+ "tablet": "24",
253
+ },
254
+ "type": "font_size",
255
+ },
256
+ ],
257
+ "text": " ipsum",
258
+ "type": "text",
259
+ },
260
+ ],
261
+ "type": "paragraph",
262
+ },
263
+ ],
264
+ "type": "doc",
265
+ }
266
+ `;
267
+
268
+ exports[`rendering should render all devices 1`] = `"<p class=\\"zw-style\\"><span style=\\"--zw-font-size-mobile:12px;--zw-font-size-tablet:14px;--zw-font-size-desktop:16px;\\" class=\\"zw-style\\">hello world</span></p>"`;
139
269
 
140
- exports[`rendering should render only desktop 1`] = `"<p class=\\"zw-style\\"><span style=\\"--zw-desktop-font-size: 14px;\\" class=\\"zw-style\\">hello world</span></p>"`;
270
+ exports[`rendering should render only desktop 1`] = `"<p class=\\"zw-style\\"><span style=\\"--zw-font-size-desktop:14px;\\" class=\\"zw-style\\">hello world</span></p>"`;
@@ -84,4 +84,145 @@ Object {
84
84
  }
85
85
  `;
86
86
 
87
- exports[`rendering should render html 1`] = `"<p class=\\"zw-style\\"><span style=\\"--zw-font-style: italic;\\" class=\\"zw-style\\">hello world</span></p>"`;
87
+ exports[`parsing html should get value from i tag 1`] = `
88
+ Object {
89
+ "content": Array [
90
+ Object {
91
+ "content": Array [
92
+ Object {
93
+ "marks": Array [
94
+ Object {
95
+ "attrs": Object {
96
+ "italic": true,
97
+ },
98
+ "type": "font_style",
99
+ },
100
+ ],
101
+ "text": "lorem",
102
+ "type": "text",
103
+ },
104
+ Object {
105
+ "text": " ipsum",
106
+ "type": "text",
107
+ },
108
+ ],
109
+ "type": "paragraph",
110
+ },
111
+ ],
112
+ "type": "doc",
113
+ }
114
+ `;
115
+
116
+ exports[`parsing html should get value from paragraph 1`] = `
117
+ Object {
118
+ "content": Array [
119
+ Object {
120
+ "content": Array [
121
+ Object {
122
+ "marks": Array [
123
+ Object {
124
+ "attrs": Object {
125
+ "italic": true,
126
+ },
127
+ "type": "font_style",
128
+ },
129
+ ],
130
+ "text": "test",
131
+ "type": "text",
132
+ },
133
+ ],
134
+ "type": "paragraph",
135
+ },
136
+ ],
137
+ "type": "doc",
138
+ }
139
+ `;
140
+
141
+ exports[`parsing html should get value from rendered view 1`] = `
142
+ Object {
143
+ "content": Array [
144
+ Object {
145
+ "content": Array [
146
+ Object {
147
+ "marks": Array [
148
+ Object {
149
+ "attrs": Object {
150
+ "italic": true,
151
+ },
152
+ "type": "font_style",
153
+ },
154
+ ],
155
+ "text": "lorem",
156
+ "type": "text",
157
+ },
158
+ Object {
159
+ "text": " ipsum",
160
+ "type": "text",
161
+ },
162
+ ],
163
+ "type": "paragraph",
164
+ },
165
+ ],
166
+ "type": "doc",
167
+ }
168
+ `;
169
+
170
+ exports[`parsing html should get value from text 1`] = `
171
+ Object {
172
+ "content": Array [
173
+ Object {
174
+ "content": Array [
175
+ Object {
176
+ "marks": Array [
177
+ Object {
178
+ "attrs": Object {
179
+ "italic": true,
180
+ },
181
+ "type": "font_style",
182
+ },
183
+ ],
184
+ "text": "lorem",
185
+ "type": "text",
186
+ },
187
+ Object {
188
+ "text": " ipsum",
189
+ "type": "text",
190
+ },
191
+ ],
192
+ "type": "paragraph",
193
+ },
194
+ ],
195
+ "type": "doc",
196
+ }
197
+ `;
198
+
199
+ exports[`parsing html should merge paragraph and text settings 1`] = `
200
+ Object {
201
+ "content": Array [
202
+ Object {
203
+ "content": Array [
204
+ Object {
205
+ "text": "lorem",
206
+ "type": "text",
207
+ },
208
+ Object {
209
+ "marks": Array [
210
+ Object {
211
+ "attrs": Object {
212
+ "italic": true,
213
+ },
214
+ "type": "font_style",
215
+ },
216
+ ],
217
+ "text": " ipsum",
218
+ "type": "text",
219
+ },
220
+ ],
221
+ "type": "paragraph",
222
+ },
223
+ ],
224
+ "type": "doc",
225
+ }
226
+ `;
227
+
228
+ exports[`rendering should render html 1`] = `"<p class=\\"zw-style\\"><span style=\\"--zw-font-style:italic;\\" class=\\"zw-style\\">hello world</span></p>"`;
@@ -137,4 +137,182 @@ Object {
137
137
  }
138
138
  `;
139
139
 
140
- exports[`rendering should render html 1`] = `"<p class=\\"zw-style\\"><span style=\\"--zw-font-weight: 700;\\" class=\\"zw-style\\">hello world</span></p>"`;
140
+ exports[`parsing html should get value from b tag 1`] = `
141
+ Object {
142
+ "content": Array [
143
+ Object {
144
+ "content": Array [
145
+ Object {
146
+ "marks": Array [
147
+ Object {
148
+ "attrs": Object {
149
+ "value": "700",
150
+ },
151
+ "type": "font_weight",
152
+ },
153
+ ],
154
+ "text": "lorem",
155
+ "type": "text",
156
+ },
157
+ Object {
158
+ "text": " ipsum",
159
+ "type": "text",
160
+ },
161
+ ],
162
+ "type": "paragraph",
163
+ },
164
+ ],
165
+ "type": "doc",
166
+ }
167
+ `;
168
+
169
+ exports[`parsing html should get value from paragraph 1`] = `
170
+ Object {
171
+ "content": Array [
172
+ Object {
173
+ "content": Array [
174
+ Object {
175
+ "marks": Array [
176
+ Object {
177
+ "attrs": Object {
178
+ "value": "700",
179
+ },
180
+ "type": "font_weight",
181
+ },
182
+ ],
183
+ "text": "test",
184
+ "type": "text",
185
+ },
186
+ ],
187
+ "type": "paragraph",
188
+ },
189
+ ],
190
+ "type": "doc",
191
+ }
192
+ `;
193
+
194
+ exports[`parsing html should get value from rendered view 1`] = `
195
+ Object {
196
+ "content": Array [
197
+ Object {
198
+ "content": Array [
199
+ Object {
200
+ "marks": Array [
201
+ Object {
202
+ "attrs": Object {
203
+ "value": "700",
204
+ },
205
+ "type": "font_weight",
206
+ },
207
+ ],
208
+ "text": "lorem",
209
+ "type": "text",
210
+ },
211
+ Object {
212
+ "text": " ipsum",
213
+ "type": "text",
214
+ },
215
+ ],
216
+ "type": "paragraph",
217
+ },
218
+ ],
219
+ "type": "doc",
220
+ }
221
+ `;
222
+
223
+ exports[`parsing html should get value from strong tag 1`] = `
224
+ Object {
225
+ "content": Array [
226
+ Object {
227
+ "content": Array [
228
+ Object {
229
+ "marks": Array [
230
+ Object {
231
+ "attrs": Object {
232
+ "value": "700",
233
+ },
234
+ "type": "font_weight",
235
+ },
236
+ ],
237
+ "text": "lorem",
238
+ "type": "text",
239
+ },
240
+ Object {
241
+ "text": " ipsum",
242
+ "type": "text",
243
+ },
244
+ ],
245
+ "type": "paragraph",
246
+ },
247
+ ],
248
+ "type": "doc",
249
+ }
250
+ `;
251
+
252
+ exports[`parsing html should get value from text 1`] = `
253
+ Object {
254
+ "content": Array [
255
+ Object {
256
+ "content": Array [
257
+ Object {
258
+ "marks": Array [
259
+ Object {
260
+ "attrs": Object {
261
+ "value": "700",
262
+ },
263
+ "type": "font_weight",
264
+ },
265
+ ],
266
+ "text": "lorem",
267
+ "type": "text",
268
+ },
269
+ Object {
270
+ "text": " ipsum",
271
+ "type": "text",
272
+ },
273
+ ],
274
+ "type": "paragraph",
275
+ },
276
+ ],
277
+ "type": "doc",
278
+ }
279
+ `;
280
+
281
+ exports[`parsing html should merge paragraph and text settings 1`] = `
282
+ Object {
283
+ "content": Array [
284
+ Object {
285
+ "content": Array [
286
+ Object {
287
+ "marks": Array [
288
+ Object {
289
+ "attrs": Object {
290
+ "value": "700",
291
+ },
292
+ "type": "font_weight",
293
+ },
294
+ ],
295
+ "text": "lorem",
296
+ "type": "text",
297
+ },
298
+ Object {
299
+ "marks": Array [
300
+ Object {
301
+ "attrs": Object {
302
+ "value": "500",
303
+ },
304
+ "type": "font_weight",
305
+ },
306
+ ],
307
+ "text": " ipsum",
308
+ "type": "text",
309
+ },
310
+ ],
311
+ "type": "paragraph",
312
+ },
313
+ ],
314
+ "type": "doc",
315
+ }
316
+ `;
317
+
318
+ exports[`rendering should render html 1`] = `"<p class=\\"zw-style\\"><span style=\\"--zw-font-weight:700;\\" class=\\"zw-style\\">hello world</span></p>"`;