@zipify/wysiwyg 3.6.1 → 3.6.2
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/cli.js +3 -3
- package/dist/wysiwyg.mjs +43 -1
- package/example/ai-component/AiComponent.vue +14 -0
- package/lib/composables/__tests__/__snapshots__/useEditor.test.js.snap +3 -0
- package/lib/extensions/__tests__/__snapshots__/Alignment.test.js.snap +15 -0
- package/lib/extensions/__tests__/__snapshots__/BackgroundColor.test.js.snap +15 -0
- package/lib/extensions/__tests__/__snapshots__/CaseStyle.test.js.snap +12 -0
- package/lib/extensions/__tests__/__snapshots__/FontColor.test.js.snap +15 -0
- package/lib/extensions/__tests__/__snapshots__/FontFamily.test.js.snap +33 -0
- package/lib/extensions/__tests__/__snapshots__/FontSize.test.js.snap +27 -0
- package/lib/extensions/__tests__/__snapshots__/FontStyle.test.js.snap +27 -0
- package/lib/extensions/__tests__/__snapshots__/FontWeight.test.js.snap +39 -0
- package/lib/extensions/__tests__/__snapshots__/LineHeight.test.js.snap +18 -0
- package/lib/extensions/__tests__/__snapshots__/Link.test.js.snap +30 -0
- package/lib/extensions/__tests__/__snapshots__/Margin.test.js.snap +9 -0
- package/lib/extensions/__tests__/__snapshots__/StylePreset.test.js.snap +45 -0
- package/lib/extensions/__tests__/__snapshots__/Superscript.test.js.snap +15 -0
- package/lib/extensions/__tests__/__snapshots__/TextDecoration.test.js.snap +63 -0
- package/lib/extensions/core/Document.js +14 -0
- package/lib/extensions/core/__tests__/__snapshots__/NodeProcessor.test.js.snap +57 -0
- package/lib/extensions/core/__tests__/__snapshots__/TextProcessor.test.js.snap +6 -0
- package/lib/extensions/list/__tests__/__snapshots__/List.test.js.snap +54 -0
- package/lib/extensions/steps/SetDocAttr.js +42 -0
- package/lib/extensions/steps/index.js +1 -0
- package/package.json +1 -1
package/dist/wysiwyg.mjs
CHANGED
|
@@ -19584,13 +19584,55 @@ const Document$1 = Node2.create({
|
|
|
19584
19584
|
topNode: true,
|
|
19585
19585
|
content: "block+"
|
|
19586
19586
|
});
|
|
19587
|
+
class SetDocAttr extends Step {
|
|
19588
|
+
constructor(key, value, schema, stepType = "SetDocAttr") {
|
|
19589
|
+
super();
|
|
19590
|
+
this.key = key;
|
|
19591
|
+
this.value = value;
|
|
19592
|
+
this.schema = schema;
|
|
19593
|
+
this.stepType = stepType;
|
|
19594
|
+
}
|
|
19595
|
+
apply(doc2) {
|
|
19596
|
+
this.prevValue = doc2.attrs.meta[this.key];
|
|
19597
|
+
const newDoc = Node$1.fromJSON(this.schema, doc2.toJSON());
|
|
19598
|
+
newDoc.attrs.meta[this.key] = this.value;
|
|
19599
|
+
return StepResult.ok(newDoc);
|
|
19600
|
+
}
|
|
19601
|
+
invert() {
|
|
19602
|
+
return new SetDocAttr(this.key, this.prevValue, this.schema, "revertSetDocAttr");
|
|
19603
|
+
}
|
|
19604
|
+
map() {
|
|
19605
|
+
return null;
|
|
19606
|
+
}
|
|
19607
|
+
toJSON() {
|
|
19608
|
+
return {
|
|
19609
|
+
stepType: this.stepType,
|
|
19610
|
+
key: this.key,
|
|
19611
|
+
value: this.value
|
|
19612
|
+
};
|
|
19613
|
+
}
|
|
19614
|
+
static fromJSON(json) {
|
|
19615
|
+
return new SetDocAttr(json.key, json.value, json.stepType);
|
|
19616
|
+
}
|
|
19617
|
+
}
|
|
19618
|
+
Step.jsonID("setDocAttr", SetDocAttr);
|
|
19587
19619
|
const Document = Document$1.extend({
|
|
19588
19620
|
marks: MarkGroups.SETTINGS,
|
|
19621
|
+
addAttributes: () => ({
|
|
19622
|
+
meta: { default: {} }
|
|
19623
|
+
}),
|
|
19589
19624
|
onCreate() {
|
|
19590
19625
|
this.editor.view.dom.addEventListener("click", (event) => {
|
|
19591
19626
|
if (event.target.closest("a"))
|
|
19592
19627
|
event.preventDefault();
|
|
19593
19628
|
});
|
|
19629
|
+
},
|
|
19630
|
+
addCommands() {
|
|
19631
|
+
return {
|
|
19632
|
+
setDocMetaAttributes: createCommand(({ state }, key, value) => {
|
|
19633
|
+
state.tr.step(new SetDocAttr(key, value, state.schema));
|
|
19634
|
+
})
|
|
19635
|
+
};
|
|
19594
19636
|
}
|
|
19595
19637
|
});
|
|
19596
19638
|
const Paragraph$1 = Node2.create({
|
|
@@ -27440,7 +27482,7 @@ var render = function __render__46() {
|
|
|
27440
27482
|
})], 1);
|
|
27441
27483
|
};
|
|
27442
27484
|
var staticRenderFns = [];
|
|
27443
|
-
const
|
|
27485
|
+
const main_css_vue_type_style_index_0_from__2FUsers_2Fmaster_2Fprojects_2FZipifyWysiwyg_2Flib_2FWysiwyg_vue_src_lang = "";
|
|
27444
27486
|
const MIN_FONT_SIZE = 5;
|
|
27445
27487
|
const MAX_FONT_SIZE = 112;
|
|
27446
27488
|
const __vue2_script = {
|
|
@@ -7,6 +7,10 @@
|
|
|
7
7
|
|
|
8
8
|
<Modal ref="modalRef" class="zw-ai-component__modal" :toggler="toggler" focus-first-control>
|
|
9
9
|
<p>Modal content</p>
|
|
10
|
+
|
|
11
|
+
<Button skin="primary" @click="onInsert">
|
|
12
|
+
Insert Content
|
|
13
|
+
</Button>
|
|
10
14
|
</Modal>
|
|
11
15
|
</div>
|
|
12
16
|
</template>
|
|
@@ -43,6 +47,15 @@ export default {
|
|
|
43
47
|
modalRef
|
|
44
48
|
});
|
|
45
49
|
|
|
50
|
+
const onInsert = () => {
|
|
51
|
+
editor.chain()
|
|
52
|
+
.focus()
|
|
53
|
+
.insertContent('Hello from AI component')
|
|
54
|
+
.setDocMeta('ai_generated', true)
|
|
55
|
+
.run();
|
|
56
|
+
toggler.close();
|
|
57
|
+
};
|
|
58
|
+
|
|
46
59
|
const isActive = computed(() => unref(toggler.isOpened));
|
|
47
60
|
|
|
48
61
|
return {
|
|
@@ -50,6 +63,7 @@ export default {
|
|
|
50
63
|
wrapperRef,
|
|
51
64
|
modalRef,
|
|
52
65
|
toggler,
|
|
66
|
+
onInsert,
|
|
53
67
|
isActive
|
|
54
68
|
};
|
|
55
69
|
}
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`change value should apply value 1`] = `
|
|
4
4
|
Object {
|
|
5
|
+
"attrs": Object {
|
|
6
|
+
"meta": Object {},
|
|
7
|
+
},
|
|
5
8
|
"content": Array [
|
|
6
9
|
Object {
|
|
7
10
|
"attrs": Object {
|
|
@@ -26,6 +29,9 @@ Object {
|
|
|
26
29
|
|
|
27
30
|
exports[`change value should remove value 1`] = `
|
|
28
31
|
Object {
|
|
32
|
+
"attrs": Object {
|
|
33
|
+
"meta": Object {},
|
|
34
|
+
},
|
|
29
35
|
"content": Array [
|
|
30
36
|
Object {
|
|
31
37
|
"attrs": Object {
|
|
@@ -46,6 +52,9 @@ Object {
|
|
|
46
52
|
|
|
47
53
|
exports[`parsing html should get alignment from rendered view 1`] = `
|
|
48
54
|
Object {
|
|
55
|
+
"attrs": Object {
|
|
56
|
+
"meta": Object {},
|
|
57
|
+
},
|
|
49
58
|
"content": Array [
|
|
50
59
|
Object {
|
|
51
60
|
"attrs": Object {
|
|
@@ -70,6 +79,9 @@ Object {
|
|
|
70
79
|
|
|
71
80
|
exports[`parsing html should get alignment from text 1`] = `
|
|
72
81
|
Object {
|
|
82
|
+
"attrs": Object {
|
|
83
|
+
"meta": Object {},
|
|
84
|
+
},
|
|
73
85
|
"content": Array [
|
|
74
86
|
Object {
|
|
75
87
|
"attrs": Object {
|
|
@@ -94,6 +106,9 @@ Object {
|
|
|
94
106
|
|
|
95
107
|
exports[`parsing html should set null if no alignment 1`] = `
|
|
96
108
|
Object {
|
|
109
|
+
"attrs": Object {
|
|
110
|
+
"meta": Object {},
|
|
111
|
+
},
|
|
97
112
|
"content": Array [
|
|
98
113
|
Object {
|
|
99
114
|
"attrs": Object {
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`apply background color should change background color 1`] = `
|
|
4
4
|
Object {
|
|
5
|
+
"attrs": Object {
|
|
6
|
+
"meta": Object {},
|
|
7
|
+
},
|
|
5
8
|
"content": Array [
|
|
6
9
|
Object {
|
|
7
10
|
"content": Array [
|
|
@@ -27,6 +30,9 @@ Object {
|
|
|
27
30
|
|
|
28
31
|
exports[`parsing html should get value from paragraph 1`] = `
|
|
29
32
|
Object {
|
|
33
|
+
"attrs": Object {
|
|
34
|
+
"meta": Object {},
|
|
35
|
+
},
|
|
30
36
|
"content": Array [
|
|
31
37
|
Object {
|
|
32
38
|
"content": Array [
|
|
@@ -52,6 +58,9 @@ Object {
|
|
|
52
58
|
|
|
53
59
|
exports[`parsing html should get value from rendered view 1`] = `
|
|
54
60
|
Object {
|
|
61
|
+
"attrs": Object {
|
|
62
|
+
"meta": Object {},
|
|
63
|
+
},
|
|
55
64
|
"content": Array [
|
|
56
65
|
Object {
|
|
57
66
|
"content": Array [
|
|
@@ -81,6 +90,9 @@ Object {
|
|
|
81
90
|
|
|
82
91
|
exports[`parsing html should get value from text 1`] = `
|
|
83
92
|
Object {
|
|
93
|
+
"attrs": Object {
|
|
94
|
+
"meta": Object {},
|
|
95
|
+
},
|
|
84
96
|
"content": Array [
|
|
85
97
|
Object {
|
|
86
98
|
"content": Array [
|
|
@@ -110,6 +122,9 @@ Object {
|
|
|
110
122
|
|
|
111
123
|
exports[`parsing html should merge paragraph and text settings 1`] = `
|
|
112
124
|
Object {
|
|
125
|
+
"attrs": Object {
|
|
126
|
+
"meta": Object {},
|
|
127
|
+
},
|
|
113
128
|
"content": Array [
|
|
114
129
|
Object {
|
|
115
130
|
"content": Array [
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`apply case style should apply capitalize 1`] = `
|
|
4
4
|
Object {
|
|
5
|
+
"attrs": Object {
|
|
6
|
+
"meta": Object {},
|
|
7
|
+
},
|
|
5
8
|
"content": Array [
|
|
6
9
|
Object {
|
|
7
10
|
"content": Array [
|
|
@@ -19,6 +22,9 @@ Object {
|
|
|
19
22
|
|
|
20
23
|
exports[`apply case style should apply case by type 1`] = `
|
|
21
24
|
Object {
|
|
25
|
+
"attrs": Object {
|
|
26
|
+
"meta": Object {},
|
|
27
|
+
},
|
|
22
28
|
"content": Array [
|
|
23
29
|
Object {
|
|
24
30
|
"content": Array [
|
|
@@ -36,6 +42,9 @@ Object {
|
|
|
36
42
|
|
|
37
43
|
exports[`apply case style should apply lowercase 1`] = `
|
|
38
44
|
Object {
|
|
45
|
+
"attrs": Object {
|
|
46
|
+
"meta": Object {},
|
|
47
|
+
},
|
|
39
48
|
"content": Array [
|
|
40
49
|
Object {
|
|
41
50
|
"content": Array [
|
|
@@ -53,6 +62,9 @@ Object {
|
|
|
53
62
|
|
|
54
63
|
exports[`apply case style should apply uppercase 1`] = `
|
|
55
64
|
Object {
|
|
65
|
+
"attrs": Object {
|
|
66
|
+
"meta": Object {},
|
|
67
|
+
},
|
|
56
68
|
"content": Array [
|
|
57
69
|
Object {
|
|
58
70
|
"content": Array [
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`apply font color should change font color 1`] = `
|
|
4
4
|
Object {
|
|
5
|
+
"attrs": Object {
|
|
6
|
+
"meta": Object {},
|
|
7
|
+
},
|
|
5
8
|
"content": Array [
|
|
6
9
|
Object {
|
|
7
10
|
"content": Array [
|
|
@@ -27,6 +30,9 @@ Object {
|
|
|
27
30
|
|
|
28
31
|
exports[`parsing html should get value from paragraph 1`] = `
|
|
29
32
|
Object {
|
|
33
|
+
"attrs": Object {
|
|
34
|
+
"meta": Object {},
|
|
35
|
+
},
|
|
30
36
|
"content": Array [
|
|
31
37
|
Object {
|
|
32
38
|
"content": Array [
|
|
@@ -52,6 +58,9 @@ Object {
|
|
|
52
58
|
|
|
53
59
|
exports[`parsing html should get value from parsed view 1`] = `
|
|
54
60
|
Object {
|
|
61
|
+
"attrs": Object {
|
|
62
|
+
"meta": Object {},
|
|
63
|
+
},
|
|
55
64
|
"content": Array [
|
|
56
65
|
Object {
|
|
57
66
|
"content": Array [
|
|
@@ -69,6 +78,9 @@ Object {
|
|
|
69
78
|
|
|
70
79
|
exports[`parsing html should get value from text 1`] = `
|
|
71
80
|
Object {
|
|
81
|
+
"attrs": Object {
|
|
82
|
+
"meta": Object {},
|
|
83
|
+
},
|
|
72
84
|
"content": Array [
|
|
73
85
|
Object {
|
|
74
86
|
"content": Array [
|
|
@@ -98,6 +110,9 @@ Object {
|
|
|
98
110
|
|
|
99
111
|
exports[`parsing html should merge paragraph and text settings 1`] = `
|
|
100
112
|
Object {
|
|
113
|
+
"attrs": Object {
|
|
114
|
+
"meta": Object {},
|
|
115
|
+
},
|
|
101
116
|
"content": Array [
|
|
102
117
|
Object {
|
|
103
118
|
"content": Array [
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`apply font family should apply closest font weight if current is unavailable 1`] = `
|
|
4
4
|
Object {
|
|
5
|
+
"attrs": Object {
|
|
6
|
+
"meta": Object {},
|
|
7
|
+
},
|
|
5
8
|
"content": Array [
|
|
6
9
|
Object {
|
|
7
10
|
"content": Array [
|
|
@@ -39,6 +42,9 @@ Object {
|
|
|
39
42
|
|
|
40
43
|
exports[`apply font family should change font family 1`] = `
|
|
41
44
|
Object {
|
|
45
|
+
"attrs": Object {
|
|
46
|
+
"meta": Object {},
|
|
47
|
+
},
|
|
42
48
|
"content": Array [
|
|
43
49
|
Object {
|
|
44
50
|
"content": Array [
|
|
@@ -70,6 +76,9 @@ Object {
|
|
|
70
76
|
|
|
71
77
|
exports[`apply font family should not change current font weight if available 1`] = `
|
|
72
78
|
Object {
|
|
79
|
+
"attrs": Object {
|
|
80
|
+
"meta": Object {},
|
|
81
|
+
},
|
|
73
82
|
"content": Array [
|
|
74
83
|
Object {
|
|
75
84
|
"content": Array [
|
|
@@ -101,6 +110,9 @@ Object {
|
|
|
101
110
|
|
|
102
111
|
exports[`apply font family should not change italic if available 1`] = `
|
|
103
112
|
Object {
|
|
113
|
+
"attrs": Object {
|
|
114
|
+
"meta": Object {},
|
|
115
|
+
},
|
|
104
116
|
"content": Array [
|
|
105
117
|
Object {
|
|
106
118
|
"content": Array [
|
|
@@ -138,6 +150,9 @@ Object {
|
|
|
138
150
|
|
|
139
151
|
exports[`apply font family should remove italic if unavailable 1`] = `
|
|
140
152
|
Object {
|
|
153
|
+
"attrs": Object {
|
|
154
|
+
"meta": Object {},
|
|
155
|
+
},
|
|
141
156
|
"content": Array [
|
|
142
157
|
Object {
|
|
143
158
|
"content": Array [
|
|
@@ -175,6 +190,9 @@ Object {
|
|
|
175
190
|
|
|
176
191
|
exports[`parsing html should get parse font name with quotes 1`] = `
|
|
177
192
|
Object {
|
|
193
|
+
"attrs": Object {
|
|
194
|
+
"meta": Object {},
|
|
195
|
+
},
|
|
178
196
|
"content": Array [
|
|
179
197
|
Object {
|
|
180
198
|
"content": Array [
|
|
@@ -204,6 +222,9 @@ Object {
|
|
|
204
222
|
|
|
205
223
|
exports[`parsing html should get set default if undefined font 1`] = `
|
|
206
224
|
Object {
|
|
225
|
+
"attrs": Object {
|
|
226
|
+
"meta": Object {},
|
|
227
|
+
},
|
|
207
228
|
"content": Array [
|
|
208
229
|
Object {
|
|
209
230
|
"content": Array [
|
|
@@ -233,6 +254,9 @@ Object {
|
|
|
233
254
|
|
|
234
255
|
exports[`parsing html should get value from paragraph 1`] = `
|
|
235
256
|
Object {
|
|
257
|
+
"attrs": Object {
|
|
258
|
+
"meta": Object {},
|
|
259
|
+
},
|
|
236
260
|
"content": Array [
|
|
237
261
|
Object {
|
|
238
262
|
"content": Array [
|
|
@@ -258,6 +282,9 @@ Object {
|
|
|
258
282
|
|
|
259
283
|
exports[`parsing html should get value from rendered view 1`] = `
|
|
260
284
|
Object {
|
|
285
|
+
"attrs": Object {
|
|
286
|
+
"meta": Object {},
|
|
287
|
+
},
|
|
261
288
|
"content": Array [
|
|
262
289
|
Object {
|
|
263
290
|
"content": Array [
|
|
@@ -287,6 +314,9 @@ Object {
|
|
|
287
314
|
|
|
288
315
|
exports[`parsing html should get value from text 1`] = `
|
|
289
316
|
Object {
|
|
317
|
+
"attrs": Object {
|
|
318
|
+
"meta": Object {},
|
|
319
|
+
},
|
|
290
320
|
"content": Array [
|
|
291
321
|
Object {
|
|
292
322
|
"content": Array [
|
|
@@ -316,6 +346,9 @@ Object {
|
|
|
316
346
|
|
|
317
347
|
exports[`parsing html should merge paragraph and text settings 1`] = `
|
|
318
348
|
Object {
|
|
349
|
+
"attrs": Object {
|
|
350
|
+
"meta": Object {},
|
|
351
|
+
},
|
|
319
352
|
"content": Array [
|
|
320
353
|
Object {
|
|
321
354
|
"content": Array [
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`apply font size should change font size 1`] = `
|
|
4
4
|
Object {
|
|
5
|
+
"attrs": Object {
|
|
6
|
+
"meta": Object {},
|
|
7
|
+
},
|
|
5
8
|
"content": Array [
|
|
6
9
|
Object {
|
|
7
10
|
"content": Array [
|
|
@@ -29,6 +32,9 @@ Object {
|
|
|
29
32
|
|
|
30
33
|
exports[`apply font size should decrease font size 1`] = `
|
|
31
34
|
Object {
|
|
35
|
+
"attrs": Object {
|
|
36
|
+
"meta": Object {},
|
|
37
|
+
},
|
|
32
38
|
"content": Array [
|
|
33
39
|
Object {
|
|
34
40
|
"content": Array [
|
|
@@ -56,6 +62,9 @@ Object {
|
|
|
56
62
|
|
|
57
63
|
exports[`apply font size should increase font size 1`] = `
|
|
58
64
|
Object {
|
|
65
|
+
"attrs": Object {
|
|
66
|
+
"meta": Object {},
|
|
67
|
+
},
|
|
59
68
|
"content": Array [
|
|
60
69
|
Object {
|
|
61
70
|
"content": Array [
|
|
@@ -83,6 +92,9 @@ Object {
|
|
|
83
92
|
|
|
84
93
|
exports[`apply font size should not decrease font size if reached limit 1`] = `
|
|
85
94
|
Object {
|
|
95
|
+
"attrs": Object {
|
|
96
|
+
"meta": Object {},
|
|
97
|
+
},
|
|
86
98
|
"content": Array [
|
|
87
99
|
Object {
|
|
88
100
|
"content": Array [
|
|
@@ -110,6 +122,9 @@ Object {
|
|
|
110
122
|
|
|
111
123
|
exports[`apply font size should not increase font size if reached limit 1`] = `
|
|
112
124
|
Object {
|
|
125
|
+
"attrs": Object {
|
|
126
|
+
"meta": Object {},
|
|
127
|
+
},
|
|
113
128
|
"content": Array [
|
|
114
129
|
Object {
|
|
115
130
|
"content": Array [
|
|
@@ -137,6 +152,9 @@ Object {
|
|
|
137
152
|
|
|
138
153
|
exports[`parsing html should get value from paragraph 1`] = `
|
|
139
154
|
Object {
|
|
155
|
+
"attrs": Object {
|
|
156
|
+
"meta": Object {},
|
|
157
|
+
},
|
|
140
158
|
"content": Array [
|
|
141
159
|
Object {
|
|
142
160
|
"content": Array [
|
|
@@ -164,6 +182,9 @@ Object {
|
|
|
164
182
|
|
|
165
183
|
exports[`parsing html should get value from rendered view 1`] = `
|
|
166
184
|
Object {
|
|
185
|
+
"attrs": Object {
|
|
186
|
+
"meta": Object {},
|
|
187
|
+
},
|
|
167
188
|
"content": Array [
|
|
168
189
|
Object {
|
|
169
190
|
"content": Array [
|
|
@@ -195,6 +216,9 @@ Object {
|
|
|
195
216
|
|
|
196
217
|
exports[`parsing html should get value from text 1`] = `
|
|
197
218
|
Object {
|
|
219
|
+
"attrs": Object {
|
|
220
|
+
"meta": Object {},
|
|
221
|
+
},
|
|
198
222
|
"content": Array [
|
|
199
223
|
Object {
|
|
200
224
|
"content": Array [
|
|
@@ -226,6 +250,9 @@ Object {
|
|
|
226
250
|
|
|
227
251
|
exports[`parsing html should merge paragraph and text settings 1`] = `
|
|
228
252
|
Object {
|
|
253
|
+
"attrs": Object {
|
|
254
|
+
"meta": Object {},
|
|
255
|
+
},
|
|
229
256
|
"content": Array [
|
|
230
257
|
Object {
|
|
231
258
|
"content": Array [
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`apply font style should make italic 1`] = `
|
|
4
4
|
Object {
|
|
5
|
+
"attrs": Object {
|
|
6
|
+
"meta": Object {},
|
|
7
|
+
},
|
|
5
8
|
"content": Array [
|
|
6
9
|
Object {
|
|
7
10
|
"content": Array [
|
|
@@ -27,6 +30,9 @@ Object {
|
|
|
27
30
|
|
|
28
31
|
exports[`apply font style should remove italic 1`] = `
|
|
29
32
|
Object {
|
|
33
|
+
"attrs": Object {
|
|
34
|
+
"meta": Object {},
|
|
35
|
+
},
|
|
30
36
|
"content": Array [
|
|
31
37
|
Object {
|
|
32
38
|
"content": Array [
|
|
@@ -52,6 +58,9 @@ Object {
|
|
|
52
58
|
|
|
53
59
|
exports[`apply font style should toggle italic to removed 1`] = `
|
|
54
60
|
Object {
|
|
61
|
+
"attrs": Object {
|
|
62
|
+
"meta": Object {},
|
|
63
|
+
},
|
|
55
64
|
"content": Array [
|
|
56
65
|
Object {
|
|
57
66
|
"content": Array [
|
|
@@ -77,6 +86,9 @@ Object {
|
|
|
77
86
|
|
|
78
87
|
exports[`apply font style should toggle italic to used 1`] = `
|
|
79
88
|
Object {
|
|
89
|
+
"attrs": Object {
|
|
90
|
+
"meta": Object {},
|
|
91
|
+
},
|
|
80
92
|
"content": Array [
|
|
81
93
|
Object {
|
|
82
94
|
"content": Array [
|
|
@@ -102,6 +114,9 @@ Object {
|
|
|
102
114
|
|
|
103
115
|
exports[`parsing html should get value from i tag 1`] = `
|
|
104
116
|
Object {
|
|
117
|
+
"attrs": Object {
|
|
118
|
+
"meta": Object {},
|
|
119
|
+
},
|
|
105
120
|
"content": Array [
|
|
106
121
|
Object {
|
|
107
122
|
"content": Array [
|
|
@@ -131,6 +146,9 @@ Object {
|
|
|
131
146
|
|
|
132
147
|
exports[`parsing html should get value from paragraph 1`] = `
|
|
133
148
|
Object {
|
|
149
|
+
"attrs": Object {
|
|
150
|
+
"meta": Object {},
|
|
151
|
+
},
|
|
134
152
|
"content": Array [
|
|
135
153
|
Object {
|
|
136
154
|
"content": Array [
|
|
@@ -156,6 +174,9 @@ Object {
|
|
|
156
174
|
|
|
157
175
|
exports[`parsing html should get value from rendered view 1`] = `
|
|
158
176
|
Object {
|
|
177
|
+
"attrs": Object {
|
|
178
|
+
"meta": Object {},
|
|
179
|
+
},
|
|
159
180
|
"content": Array [
|
|
160
181
|
Object {
|
|
161
182
|
"content": Array [
|
|
@@ -185,6 +206,9 @@ Object {
|
|
|
185
206
|
|
|
186
207
|
exports[`parsing html should get value from text 1`] = `
|
|
187
208
|
Object {
|
|
209
|
+
"attrs": Object {
|
|
210
|
+
"meta": Object {},
|
|
211
|
+
},
|
|
188
212
|
"content": Array [
|
|
189
213
|
Object {
|
|
190
214
|
"content": Array [
|
|
@@ -214,6 +238,9 @@ Object {
|
|
|
214
238
|
|
|
215
239
|
exports[`parsing html should merge paragraph and text settings 1`] = `
|
|
216
240
|
Object {
|
|
241
|
+
"attrs": Object {
|
|
242
|
+
"meta": Object {},
|
|
243
|
+
},
|
|
217
244
|
"content": Array [
|
|
218
245
|
Object {
|
|
219
246
|
"content": Array [
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`apply font weight should change font weight 1`] = `
|
|
4
4
|
Object {
|
|
5
|
+
"attrs": Object {
|
|
6
|
+
"meta": Object {},
|
|
7
|
+
},
|
|
5
8
|
"content": Array [
|
|
6
9
|
Object {
|
|
7
10
|
"content": Array [
|
|
@@ -27,6 +30,9 @@ Object {
|
|
|
27
30
|
|
|
28
31
|
exports[`apply font weight should toggle weight to bold 1`] = `
|
|
29
32
|
Object {
|
|
33
|
+
"attrs": Object {
|
|
34
|
+
"meta": Object {},
|
|
35
|
+
},
|
|
30
36
|
"content": Array [
|
|
31
37
|
Object {
|
|
32
38
|
"content": Array [
|
|
@@ -52,6 +58,9 @@ Object {
|
|
|
52
58
|
|
|
53
59
|
exports[`apply font weight should toggle weight to closest bold 1`] = `
|
|
54
60
|
Object {
|
|
61
|
+
"attrs": Object {
|
|
62
|
+
"meta": Object {},
|
|
63
|
+
},
|
|
55
64
|
"content": Array [
|
|
56
65
|
Object {
|
|
57
66
|
"content": Array [
|
|
@@ -83,6 +92,9 @@ Object {
|
|
|
83
92
|
|
|
84
93
|
exports[`apply font weight should toggle weight to closest medium 1`] = `
|
|
85
94
|
Object {
|
|
95
|
+
"attrs": Object {
|
|
96
|
+
"meta": Object {},
|
|
97
|
+
},
|
|
86
98
|
"content": Array [
|
|
87
99
|
Object {
|
|
88
100
|
"content": Array [
|
|
@@ -114,6 +126,9 @@ Object {
|
|
|
114
126
|
|
|
115
127
|
exports[`apply font weight should toggle weight to medium 1`] = `
|
|
116
128
|
Object {
|
|
129
|
+
"attrs": Object {
|
|
130
|
+
"meta": Object {},
|
|
131
|
+
},
|
|
117
132
|
"content": Array [
|
|
118
133
|
Object {
|
|
119
134
|
"content": Array [
|
|
@@ -139,6 +154,9 @@ Object {
|
|
|
139
154
|
|
|
140
155
|
exports[`parsing html should get value from b tag 1`] = `
|
|
141
156
|
Object {
|
|
157
|
+
"attrs": Object {
|
|
158
|
+
"meta": Object {},
|
|
159
|
+
},
|
|
142
160
|
"content": Array [
|
|
143
161
|
Object {
|
|
144
162
|
"content": Array [
|
|
@@ -168,6 +186,9 @@ Object {
|
|
|
168
186
|
|
|
169
187
|
exports[`parsing html should get value from paragraph 1`] = `
|
|
170
188
|
Object {
|
|
189
|
+
"attrs": Object {
|
|
190
|
+
"meta": Object {},
|
|
191
|
+
},
|
|
171
192
|
"content": Array [
|
|
172
193
|
Object {
|
|
173
194
|
"content": Array [
|
|
@@ -193,6 +214,9 @@ Object {
|
|
|
193
214
|
|
|
194
215
|
exports[`parsing html should get value from rendered view 1`] = `
|
|
195
216
|
Object {
|
|
217
|
+
"attrs": Object {
|
|
218
|
+
"meta": Object {},
|
|
219
|
+
},
|
|
196
220
|
"content": Array [
|
|
197
221
|
Object {
|
|
198
222
|
"content": Array [
|
|
@@ -222,6 +246,9 @@ Object {
|
|
|
222
246
|
|
|
223
247
|
exports[`parsing html should get value from strong tag 1`] = `
|
|
224
248
|
Object {
|
|
249
|
+
"attrs": Object {
|
|
250
|
+
"meta": Object {},
|
|
251
|
+
},
|
|
225
252
|
"content": Array [
|
|
226
253
|
Object {
|
|
227
254
|
"content": Array [
|
|
@@ -251,6 +278,9 @@ Object {
|
|
|
251
278
|
|
|
252
279
|
exports[`parsing html should get value from text 1`] = `
|
|
253
280
|
Object {
|
|
281
|
+
"attrs": Object {
|
|
282
|
+
"meta": Object {},
|
|
283
|
+
},
|
|
254
284
|
"content": Array [
|
|
255
285
|
Object {
|
|
256
286
|
"content": Array [
|
|
@@ -280,6 +310,9 @@ Object {
|
|
|
280
310
|
|
|
281
311
|
exports[`parsing html should ignore invalid value 1`] = `
|
|
282
312
|
Object {
|
|
313
|
+
"attrs": Object {
|
|
314
|
+
"meta": Object {},
|
|
315
|
+
},
|
|
283
316
|
"content": Array [
|
|
284
317
|
Object {
|
|
285
318
|
"content": Array [
|
|
@@ -297,6 +330,9 @@ Object {
|
|
|
297
330
|
|
|
298
331
|
exports[`parsing html should merge paragraph and text settings 1`] = `
|
|
299
332
|
Object {
|
|
333
|
+
"attrs": Object {
|
|
334
|
+
"meta": Object {},
|
|
335
|
+
},
|
|
300
336
|
"content": Array [
|
|
301
337
|
Object {
|
|
302
338
|
"content": Array [
|
|
@@ -334,6 +370,9 @@ Object {
|
|
|
334
370
|
|
|
335
371
|
exports[`parsing html should parse style shorthand 1`] = `
|
|
336
372
|
Object {
|
|
373
|
+
"attrs": Object {
|
|
374
|
+
"meta": Object {},
|
|
375
|
+
},
|
|
337
376
|
"content": Array [
|
|
338
377
|
Object {
|
|
339
378
|
"content": Array [
|