@contentful/field-editor-rich-text 2.0.0-next.26 → 2.0.0-next.29
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/CHANGELOG.md +410 -0
- package/dist/field-editor-rich-text.cjs.development.js +121 -87
- package/dist/field-editor-rich-text.cjs.development.js.map +1 -1
- package/dist/field-editor-rich-text.cjs.production.min.js +1 -1
- package/dist/field-editor-rich-text.cjs.production.min.js.map +1 -1
- package/dist/field-editor-rich-text.esm.js +125 -91
- package/dist/field-editor-rich-text.esm.js.map +1 -1
- package/dist/helpers/editor.d.ts +1 -3
- package/dist/plugins/Table/insertTableFragment.d.ts +3 -0
- package/dist/plugins/Table/onKeyDownTable.d.ts +3 -0
- package/package.json +1 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
+
|
|
6
|
+
# [1.0.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.20.0...@contentful/field-editor-rich-text@1.0.0) (2021-11-04)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
9
|
+
|
|
10
|
+
# [0.20.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.19.20...@contentful/field-editor-rich-text@0.20.0) (2021-11-04)
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
- Forma v4 components adoption ([#805](https://github.com/contentful/field-editors/issues/805)) ([526bde6](https://github.com/contentful/field-editors/commit/526bde6e10e0ee3789705ec10fb31489af7ca59e))
|
|
15
|
+
|
|
16
|
+
### BREAKING CHANGES
|
|
17
|
+
|
|
18
|
+
- adopts a new Forma v4 beta
|
|
19
|
+
|
|
20
|
+
## [0.19.20](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.19.19...@contentful/field-editor-rich-text@0.19.20) (2021-11-01)
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
- **rich-text-editor:** specify font-family ([#907](https://github.com/contentful/field-editors/issues/907)) ([33dee3d](https://github.com/contentful/field-editors/commit/33dee3d6dbec66c7538cad2133d41692bd7839ca))
|
|
25
|
+
|
|
26
|
+
## [0.19.19](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.19.18...@contentful/field-editor-rich-text@0.19.19) (2021-10-18)
|
|
27
|
+
|
|
28
|
+
### Bug Fixes
|
|
29
|
+
|
|
30
|
+
- [] Remove test utils from peer dependencies ([#889](https://github.com/contentful/field-editors/issues/889)) ([3694bd7](https://github.com/contentful/field-editors/commit/3694bd7e706b8beb1f685167125f36ef0cbe82de))
|
|
31
|
+
|
|
32
|
+
## [0.19.18](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.19.17...@contentful/field-editor-rich-text@0.19.18) (2021-10-14)
|
|
33
|
+
|
|
34
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
35
|
+
|
|
36
|
+
## [0.19.17](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.19.16...@contentful/field-editor-rich-text@0.19.17) (2021-10-06)
|
|
37
|
+
|
|
38
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
39
|
+
|
|
40
|
+
## [0.19.16](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.19.15...@contentful/field-editor-rich-text@0.19.16) (2021-10-06)
|
|
41
|
+
|
|
42
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
43
|
+
|
|
44
|
+
## [0.19.15](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.19.14...@contentful/field-editor-rich-text@0.19.15) (2021-09-20)
|
|
45
|
+
|
|
46
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
47
|
+
|
|
48
|
+
## [0.19.14](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.19.13...@contentful/field-editor-rich-text@0.19.14) (2021-09-17)
|
|
49
|
+
|
|
50
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
51
|
+
|
|
52
|
+
## [0.19.13](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.19.12...@contentful/field-editor-rich-text@0.19.13) (2021-09-17)
|
|
53
|
+
|
|
54
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
55
|
+
|
|
56
|
+
## [0.19.12](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.19.11...@contentful/field-editor-rich-text@0.19.12) (2021-09-16)
|
|
57
|
+
|
|
58
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
59
|
+
|
|
60
|
+
## [0.19.11](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.19.9...@contentful/field-editor-rich-text@0.19.11) (2021-08-24)
|
|
61
|
+
|
|
62
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
63
|
+
|
|
64
|
+
## [0.19.9](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.19.8...@contentful/field-editor-rich-text@0.19.9) (2021-08-19)
|
|
65
|
+
|
|
66
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
67
|
+
|
|
68
|
+
## [0.19.8](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.19.7...@contentful/field-editor-rich-text@0.19.8) (2021-08-06)
|
|
69
|
+
|
|
70
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
71
|
+
|
|
72
|
+
## [0.19.7](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.19.6...@contentful/field-editor-rich-text@0.19.7) (2021-08-04)
|
|
73
|
+
|
|
74
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
75
|
+
|
|
76
|
+
## [0.19.6](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.19.5...@contentful/field-editor-rich-text@0.19.6) (2021-07-30)
|
|
77
|
+
|
|
78
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
79
|
+
|
|
80
|
+
## [0.19.5](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.19.4...@contentful/field-editor-rich-text@0.19.5) (2021-07-29)
|
|
81
|
+
|
|
82
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
83
|
+
|
|
84
|
+
## [0.19.4](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.19.3...@contentful/field-editor-rich-text@0.19.4) (2021-07-28)
|
|
85
|
+
|
|
86
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
87
|
+
|
|
88
|
+
## [0.19.3](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.19.2...@contentful/field-editor-rich-text@0.19.3) (2021-07-28)
|
|
89
|
+
|
|
90
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
91
|
+
|
|
92
|
+
## [0.19.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.19.0...@contentful/field-editor-rich-text@0.19.2) (2021-07-26)
|
|
93
|
+
|
|
94
|
+
### Bug Fixes
|
|
95
|
+
|
|
96
|
+
- adjust rich-text version manually ([#781](https://github.com/contentful/field-editors/issues/781)) ([f770e4f](https://github.com/contentful/field-editors/commit/f770e4f731f1ebec0ac64881c8c60015709fa26d))
|
|
97
|
+
|
|
98
|
+
# [0.19.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.18.16...@contentful/field-editor-rich-text@0.19.0) (2021-07-23)
|
|
99
|
+
|
|
100
|
+
### Features
|
|
101
|
+
|
|
102
|
+
- 💡 new color tokens ([#778](https://github.com/contentful/field-editors/issues/778)) ([fba548d](https://github.com/contentful/field-editors/commit/fba548de32305016df7f2685634eefb14294828f))
|
|
103
|
+
|
|
104
|
+
## [0.18.16](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.18.13...@contentful/field-editor-rich-text@0.18.16) (2021-07-06)
|
|
105
|
+
|
|
106
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
107
|
+
|
|
108
|
+
## [0.18.15](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.18.13...@contentful/field-editor-rich-text@0.18.15) (2021-07-06)
|
|
109
|
+
|
|
110
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
111
|
+
|
|
112
|
+
## [0.18.14](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.18.13...@contentful/field-editor-rich-text@0.18.14) (2021-06-23)
|
|
113
|
+
|
|
114
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
115
|
+
|
|
116
|
+
## [0.18.13](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.18.12...@contentful/field-editor-rich-text@0.18.13) (2021-06-23)
|
|
117
|
+
|
|
118
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
119
|
+
|
|
120
|
+
## [0.18.12](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.18.11...@contentful/field-editor-rich-text@0.18.12) (2021-06-22)
|
|
121
|
+
|
|
122
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
123
|
+
|
|
124
|
+
## [0.18.11](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.18.10...@contentful/field-editor-rich-text@0.18.11) (2021-05-20)
|
|
125
|
+
|
|
126
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
127
|
+
|
|
128
|
+
## [0.18.10](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.18.9...@contentful/field-editor-rich-text@0.18.10) (2021-04-13)
|
|
129
|
+
|
|
130
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
131
|
+
|
|
132
|
+
## [0.18.9](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.18.8...@contentful/field-editor-rich-text@0.18.9) (2021-04-06)
|
|
133
|
+
|
|
134
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
135
|
+
|
|
136
|
+
## [0.18.8](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.18.7...@contentful/field-editor-rich-text@0.18.8) (2021-03-29)
|
|
137
|
+
|
|
138
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
139
|
+
|
|
140
|
+
## [0.18.7](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.18.6...@contentful/field-editor-rich-text@0.18.7) (2021-03-15)
|
|
141
|
+
|
|
142
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
143
|
+
|
|
144
|
+
## [0.18.6](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.18.5...@contentful/field-editor-rich-text@0.18.6) (2021-03-12)
|
|
145
|
+
|
|
146
|
+
### Bug Fixes
|
|
147
|
+
|
|
148
|
+
- 🐛 fetching in rich text and optimize scheduled actions ([#630](https://github.com/contentful/field-editors/issues/630)) ([d3ff315](https://github.com/contentful/field-editors/commit/d3ff315364bfd542361c9506f4692e4884687821))
|
|
149
|
+
|
|
150
|
+
## [0.18.5](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.18.4...@contentful/field-editor-rich-text@0.18.5) (2021-03-12)
|
|
151
|
+
|
|
152
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
153
|
+
|
|
154
|
+
## [0.18.4](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.18.3...@contentful/field-editor-rich-text@0.18.4) (2021-03-10)
|
|
155
|
+
|
|
156
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
157
|
+
|
|
158
|
+
## [0.18.3](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.18.2...@contentful/field-editor-rich-text@0.18.3) (2021-03-05)
|
|
159
|
+
|
|
160
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
161
|
+
|
|
162
|
+
## [0.18.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.18.1...@contentful/field-editor-rich-text@0.18.2) (2021-03-04)
|
|
163
|
+
|
|
164
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
165
|
+
|
|
166
|
+
## [0.18.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.18.0...@contentful/field-editor-rich-text@0.18.1) (2021-03-02)
|
|
167
|
+
|
|
168
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
169
|
+
|
|
170
|
+
# [0.18.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.17.7...@contentful/field-editor-rich-text@0.18.0) (2021-02-19)
|
|
171
|
+
|
|
172
|
+
### Features
|
|
173
|
+
|
|
174
|
+
- bump min version of forma-36 ([#606](https://github.com/contentful/field-editors/issues/606)) ([fd57c7a](https://github.com/contentful/field-editors/commit/fd57c7a4312766af38c01507f17706ab22992617))
|
|
175
|
+
|
|
176
|
+
## [0.17.7](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.17.6...@contentful/field-editor-rich-text@0.17.7) (2021-02-16)
|
|
177
|
+
|
|
178
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
179
|
+
|
|
180
|
+
## [0.17.6](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.17.5...@contentful/field-editor-rich-text@0.17.6) (2021-02-09)
|
|
181
|
+
|
|
182
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
183
|
+
|
|
184
|
+
## [0.17.5](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.17.4...@contentful/field-editor-rich-text@0.17.5) (2021-02-08)
|
|
185
|
+
|
|
186
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
187
|
+
|
|
188
|
+
## [0.17.4](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.17.3...@contentful/field-editor-rich-text@0.17.4) (2021-02-05)
|
|
189
|
+
|
|
190
|
+
### Bug Fixes
|
|
191
|
+
|
|
192
|
+
- **rich-text:** command palette and embed dropdown icons ([#585](https://github.com/contentful/field-editors/issues/585)) ([7a1c301](https://github.com/contentful/field-editors/commit/7a1c301dca784700a35e98e23f85c92562d41081))
|
|
193
|
+
|
|
194
|
+
## [0.17.3](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.17.2...@contentful/field-editor-rich-text@0.17.3) (2021-02-03)
|
|
195
|
+
|
|
196
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
197
|
+
|
|
198
|
+
## [0.17.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.17.1...@contentful/field-editor-rich-text@0.17.2) (2021-02-01)
|
|
199
|
+
|
|
200
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
201
|
+
|
|
202
|
+
## [0.17.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.17.0...@contentful/field-editor-rich-text@0.17.1) (2021-01-25)
|
|
203
|
+
|
|
204
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
205
|
+
|
|
206
|
+
# [0.17.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.16.3...@contentful/field-editor-rich-text@0.17.0) (2021-01-20)
|
|
207
|
+
|
|
208
|
+
### Features
|
|
209
|
+
|
|
210
|
+
- update minimal forma-36 versions to use updated design ([#565](https://github.com/contentful/field-editors/issues/565)) ([332c734](https://github.com/contentful/field-editors/commit/332c734bfaf54f0e9773fcbb460d743b1f5459ec))
|
|
211
|
+
|
|
212
|
+
## [0.16.3](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.16.2...@contentful/field-editor-rich-text@0.16.3) (2021-01-20)
|
|
213
|
+
|
|
214
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
215
|
+
|
|
216
|
+
## [0.16.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.16.1...@contentful/field-editor-rich-text@0.16.2) (2021-01-13)
|
|
217
|
+
|
|
218
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
219
|
+
|
|
220
|
+
## [0.16.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.16.0...@contentful/field-editor-rich-text@0.16.1) (2021-01-12)
|
|
221
|
+
|
|
222
|
+
### Bug Fixes
|
|
223
|
+
|
|
224
|
+
- use forma tokens for border radiuses ([#553](https://github.com/contentful/field-editors/issues/553)) ([f4eb745](https://github.com/contentful/field-editors/commit/f4eb74568c7bc0cc25028542821ba64e50e226bd))
|
|
225
|
+
|
|
226
|
+
# [0.16.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.15.5...@contentful/field-editor-rich-text@0.16.0) (2021-01-12)
|
|
227
|
+
|
|
228
|
+
### Features
|
|
229
|
+
|
|
230
|
+
- update minimal required Forma version to the 3.73.12 ([#552](https://github.com/contentful/field-editors/issues/552)) ([2816fd9](https://github.com/contentful/field-editors/commit/2816fd960c28815faebf49a9ef8f4c4c0d91fc36))
|
|
231
|
+
|
|
232
|
+
## [0.15.5](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.15.4...@contentful/field-editor-rich-text@0.15.5) (2021-01-11)
|
|
233
|
+
|
|
234
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
235
|
+
|
|
236
|
+
## [0.15.4](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.15.3...@contentful/field-editor-rich-text@0.15.4) (2020-12-23)
|
|
237
|
+
|
|
238
|
+
### Bug Fixes
|
|
239
|
+
|
|
240
|
+
- use correct prop types ([#538](https://github.com/contentful/field-editors/issues/538)) ([f878a3a](https://github.com/contentful/field-editors/commit/f878a3a4f5c2d32455ac7932540d612a1c1a461a))
|
|
241
|
+
|
|
242
|
+
## [0.15.3](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.15.2...@contentful/field-editor-rich-text@0.15.3) (2020-12-21)
|
|
243
|
+
|
|
244
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
245
|
+
|
|
246
|
+
## [0.15.2](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.15.1...@contentful/field-editor-rich-text@0.15.2) (2020-12-16)
|
|
247
|
+
|
|
248
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
249
|
+
|
|
250
|
+
## [0.15.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.15.0...@contentful/field-editor-rich-text@0.15.1) (2020-12-16)
|
|
251
|
+
|
|
252
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
253
|
+
|
|
254
|
+
# [0.15.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.39...@contentful/field-editor-rich-text@0.15.0) (2020-12-16)
|
|
255
|
+
|
|
256
|
+
### Features
|
|
257
|
+
|
|
258
|
+
- minHeight props ([#529](https://github.com/contentful/field-editors/issues/529)) ([672e5d1](https://github.com/contentful/field-editors/commit/672e5d10356547ba99888dfeedc5ffd7b6e264cb))
|
|
259
|
+
|
|
260
|
+
## [0.14.39](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.38...@contentful/field-editor-rich-text@0.14.39) (2020-12-10)
|
|
261
|
+
|
|
262
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
263
|
+
|
|
264
|
+
## [0.14.38](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.37...@contentful/field-editor-rich-text@0.14.38) (2020-11-23)
|
|
265
|
+
|
|
266
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
267
|
+
|
|
268
|
+
## [0.14.37](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.36...@contentful/field-editor-rich-text@0.14.37) (2020-11-23)
|
|
269
|
+
|
|
270
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
271
|
+
|
|
272
|
+
## [0.14.36](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.35...@contentful/field-editor-rich-text@0.14.36) (2020-11-17)
|
|
273
|
+
|
|
274
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
275
|
+
|
|
276
|
+
## [0.14.35](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.34...@contentful/field-editor-rich-text@0.14.35) (2020-11-17)
|
|
277
|
+
|
|
278
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
279
|
+
|
|
280
|
+
## [0.14.34](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.33...@contentful/field-editor-rich-text@0.14.34) (2020-11-13)
|
|
281
|
+
|
|
282
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
283
|
+
|
|
284
|
+
## [0.14.33](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.32...@contentful/field-editor-rich-text@0.14.33) (2020-11-13)
|
|
285
|
+
|
|
286
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
287
|
+
|
|
288
|
+
## [0.14.32](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.31...@contentful/field-editor-rich-text@0.14.32) (2020-11-11)
|
|
289
|
+
|
|
290
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
291
|
+
|
|
292
|
+
## [0.14.31](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.30...@contentful/field-editor-rich-text@0.14.31) (2020-11-10)
|
|
293
|
+
|
|
294
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
295
|
+
|
|
296
|
+
## [0.14.30](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.29...@contentful/field-editor-rich-text@0.14.30) (2020-11-09)
|
|
297
|
+
|
|
298
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
299
|
+
|
|
300
|
+
## [0.14.29](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.28...@contentful/field-editor-rich-text@0.14.29) (2020-11-09)
|
|
301
|
+
|
|
302
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
303
|
+
|
|
304
|
+
## [0.14.28](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.27...@contentful/field-editor-rich-text@0.14.28) (2020-11-06)
|
|
305
|
+
|
|
306
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
307
|
+
|
|
308
|
+
## [0.14.27](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.26...@contentful/field-editor-rich-text@0.14.27) (2020-11-06)
|
|
309
|
+
|
|
310
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
311
|
+
|
|
312
|
+
## [0.14.26](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.25...@contentful/field-editor-rich-text@0.14.26) (2020-11-04)
|
|
313
|
+
|
|
314
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
315
|
+
|
|
316
|
+
## [0.14.25](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.24...@contentful/field-editor-rich-text@0.14.25) (2020-10-28)
|
|
317
|
+
|
|
318
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
319
|
+
|
|
320
|
+
## [0.14.24](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.23...@contentful/field-editor-rich-text@0.14.24) (2020-10-28)
|
|
321
|
+
|
|
322
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
323
|
+
|
|
324
|
+
## [0.14.23](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.22...@contentful/field-editor-rich-text@0.14.23) (2020-10-27)
|
|
325
|
+
|
|
326
|
+
### Bug Fixes
|
|
327
|
+
|
|
328
|
+
- do not call set state on unmounted rich-text ([#463](https://github.com/contentful/field-editors/issues/463)) ([5cc5ef4](https://github.com/contentful/field-editors/commit/5cc5ef4fc18f8c039626b1efd3a5072f2edc7628))
|
|
329
|
+
|
|
330
|
+
## [0.14.22](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.21...@contentful/field-editor-rich-text@0.14.22) (2020-10-23)
|
|
331
|
+
|
|
332
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
333
|
+
|
|
334
|
+
## [0.14.21](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.20...@contentful/field-editor-rich-text@0.14.21) (2020-10-21)
|
|
335
|
+
|
|
336
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
337
|
+
|
|
338
|
+
## [0.14.20](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.19...@contentful/field-editor-rich-text@0.14.20) (2020-10-15)
|
|
339
|
+
|
|
340
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
341
|
+
|
|
342
|
+
## [0.14.19](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.18...@contentful/field-editor-rich-text@0.14.19) (2020-10-09)
|
|
343
|
+
|
|
344
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
345
|
+
|
|
346
|
+
## [0.14.18](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.17...@contentful/field-editor-rich-text@0.14.18) (2020-10-09)
|
|
347
|
+
|
|
348
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
349
|
+
|
|
350
|
+
## [0.14.17](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.16...@contentful/field-editor-rich-text@0.14.17) (2020-10-02)
|
|
351
|
+
|
|
352
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
353
|
+
|
|
354
|
+
## [0.14.16](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.15...@contentful/field-editor-rich-text@0.14.16) (2020-10-02)
|
|
355
|
+
|
|
356
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
357
|
+
|
|
358
|
+
## [0.14.15](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.14...@contentful/field-editor-rich-text@0.14.15) (2020-10-01)
|
|
359
|
+
|
|
360
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
361
|
+
|
|
362
|
+
## [0.14.14](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.13...@contentful/field-editor-rich-text@0.14.14) (2020-09-29)
|
|
363
|
+
|
|
364
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
365
|
+
|
|
366
|
+
## [0.14.13](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.12...@contentful/field-editor-rich-text@0.14.13) (2020-09-29)
|
|
367
|
+
|
|
368
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
369
|
+
|
|
370
|
+
## [0.14.12](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.11...@contentful/field-editor-rich-text@0.14.12) (2020-09-22)
|
|
371
|
+
|
|
372
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
373
|
+
|
|
374
|
+
## [0.14.11](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.10...@contentful/field-editor-rich-text@0.14.11) (2020-09-21)
|
|
375
|
+
|
|
376
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
377
|
+
|
|
378
|
+
## [0.14.10](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.9...@contentful/field-editor-rich-text@0.14.10) (2020-09-02)
|
|
379
|
+
|
|
380
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
381
|
+
|
|
382
|
+
## [0.14.9](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.8...@contentful/field-editor-rich-text@0.14.9) (2020-09-01)
|
|
383
|
+
|
|
384
|
+
### Bug Fixes
|
|
385
|
+
|
|
386
|
+
- 🐛 allow heigh overflow for hyperlink dialog ([#386](https://github.com/contentful/field-editors/issues/386)) ([2cfd46c](https://github.com/contentful/field-editors/commit/2cfd46c3d238ee32abad6a2ca48b422115d285c3))
|
|
387
|
+
|
|
388
|
+
## [0.14.8](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.7...@contentful/field-editor-rich-text@0.14.8) (2020-09-01)
|
|
389
|
+
|
|
390
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
391
|
+
|
|
392
|
+
## [0.14.7](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.6...@contentful/field-editor-rich-text@0.14.7) (2020-08-27)
|
|
393
|
+
|
|
394
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
395
|
+
|
|
396
|
+
## [0.14.6](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.5...@contentful/field-editor-rich-text@0.14.6) (2020-08-27)
|
|
397
|
+
|
|
398
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
399
|
+
|
|
400
|
+
## [0.14.5](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.4...@contentful/field-editor-rich-text@0.14.5) (2020-08-27)
|
|
401
|
+
|
|
402
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
403
|
+
|
|
404
|
+
## [0.14.4](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.3...@contentful/field-editor-rich-text@0.14.4) (2020-08-24)
|
|
405
|
+
|
|
406
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
407
|
+
|
|
408
|
+
## [0.14.3](https://github.com/contentful/field-editors/compare/@contentful/field-editor-rich-text@0.14.2...@contentful/field-editor-rich-text@0.14.3) (2020-08-24)
|
|
409
|
+
|
|
410
|
+
**Note:** Version bump only for package @contentful/field-editor-rich-text
|
|
@@ -461,7 +461,7 @@ function moveToTheNextChar(editor) {
|
|
|
461
461
|
unit: 'character'
|
|
462
462
|
});
|
|
463
463
|
}
|
|
464
|
-
function insertEmptyParagraph(editor) {
|
|
464
|
+
function insertEmptyParagraph(editor, options) {
|
|
465
465
|
var emptyParagraph = {
|
|
466
466
|
type: Contentful.BLOCKS.PARAGRAPH,
|
|
467
467
|
children: [{
|
|
@@ -470,7 +470,7 @@ function insertEmptyParagraph(editor) {
|
|
|
470
470
|
data: {},
|
|
471
471
|
isVoid: false
|
|
472
472
|
};
|
|
473
|
-
slate.Transforms.insertNodes(editor, emptyParagraph);
|
|
473
|
+
slate.Transforms.insertNodes(editor, emptyParagraph, options);
|
|
474
474
|
}
|
|
475
475
|
function getElementFromCurrentSelection(editor) {
|
|
476
476
|
if (!editor.selection) return [];
|
|
@@ -590,58 +590,6 @@ function getAncestorPathFromSelection(editor) {
|
|
|
590
590
|
return level.length === 1;
|
|
591
591
|
});
|
|
592
592
|
}
|
|
593
|
-
var isAtEndOfTextSelection = function isAtEndOfTextSelection(editor) {
|
|
594
|
-
var _editor$selection2, _editor$selection3;
|
|
595
|
-
|
|
596
|
-
return ((_editor$selection2 = editor.selection) == null ? void 0 : _editor$selection2.focus.offset) === plateCore.getText(editor, (_editor$selection3 = editor.selection) == null ? void 0 : _editor$selection3.focus.path).length;
|
|
597
|
-
};
|
|
598
|
-
function currentSelectionStartsTableCell(editor) {
|
|
599
|
-
var _editor$selection4;
|
|
600
|
-
|
|
601
|
-
var _getNodeEntryFromSele2 = getNodeEntryFromSelection(editor, [Contentful.BLOCKS.TABLE_CELL, Contentful.BLOCKS.TABLE_HEADER_CELL]),
|
|
602
|
-
tableCellNode = _getNodeEntryFromSele2[0],
|
|
603
|
-
path = _getNodeEntryFromSele2[1];
|
|
604
|
-
|
|
605
|
-
return !!tableCellNode && (!plateCore.getText(editor, path) || ((_editor$selection4 = editor.selection) == null ? void 0 : _editor$selection4.focus.offset) === 0);
|
|
606
|
-
}
|
|
607
|
-
/**
|
|
608
|
-
* This traversal strategy is unfortunately necessary because Slate doesn't
|
|
609
|
-
* expose something like Node.next(editor).
|
|
610
|
-
*/
|
|
611
|
-
|
|
612
|
-
function getNextNode(editor) {
|
|
613
|
-
if (!editor.selection) {
|
|
614
|
-
return null;
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
var descendants = slate.Node.descendants(editor, {
|
|
618
|
-
from: editor.selection.focus.path
|
|
619
|
-
}); // eslint-disable-next-line no-constant-condition
|
|
620
|
-
|
|
621
|
-
while (true) {
|
|
622
|
-
var _descendants$next = descendants.next(),
|
|
623
|
-
done = _descendants$next.done,
|
|
624
|
-
value = _descendants$next.value;
|
|
625
|
-
|
|
626
|
-
if (done) {
|
|
627
|
-
return null;
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
var node = value[0],
|
|
631
|
-
path = value[1];
|
|
632
|
-
|
|
633
|
-
if (slate.Path.isCommon(path, editor.selection.focus.path)) {
|
|
634
|
-
continue;
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
return node;
|
|
638
|
-
}
|
|
639
|
-
} // TODO: move to table plugin
|
|
640
|
-
|
|
641
|
-
function currentSelectionPrecedesTableCell(editor) {
|
|
642
|
-
var nextNode = getNextNode(editor);
|
|
643
|
-
return !!nextNode && Contentful.TABLE_BLOCKS.includes(nextNode.type) && isAtEndOfTextSelection(editor);
|
|
644
|
-
}
|
|
645
593
|
var INLINE_TYPES = /*#__PURE__*/Object.values(Contentful.INLINES);
|
|
646
594
|
var isInlineOrText = function isInlineOrText(node) {
|
|
647
595
|
// either text or inline elements
|
|
@@ -5923,21 +5871,126 @@ var Row = function Row(props) {
|
|
|
5923
5871
|
var _templateObject$a;
|
|
5924
5872
|
var style$5 = /*#__PURE__*/emotion.css(_templateObject$a || (_templateObject$a = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n margin-bottom: 1.5em;\n border-collapse: collapse;\n border-radius: 5px;\n border-style: hidden;\n box-shadow: 0 0 0 1px ", ";\n width: 100%;\n table-layout: fixed;\n overflow: hidden;\n"])), tokens.gray400);
|
|
5925
5873
|
var Table = function Table(props) {
|
|
5926
|
-
return /*#__PURE__*/React.createElement("
|
|
5874
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
5875
|
+
"data-block-type": Contentful.BLOCKS.TABLE
|
|
5876
|
+
}, /*#__PURE__*/React.createElement("table", Object.assign({
|
|
5927
5877
|
className: style$5
|
|
5928
|
-
}), /*#__PURE__*/React.createElement("tbody", null, props.children));
|
|
5878
|
+
}, props.attributes), /*#__PURE__*/React.createElement("tbody", null, props.children)));
|
|
5879
|
+
};
|
|
5880
|
+
|
|
5881
|
+
/**
|
|
5882
|
+
* Removes table wrappers when pasting a single table cell
|
|
5883
|
+
*
|
|
5884
|
+
* In Plate/Slate, copying the content of a table cell wraps
|
|
5885
|
+
* it in a <table><tr><td>{content}</td></tr></table> even
|
|
5886
|
+
* when copying partial cell content.
|
|
5887
|
+
*
|
|
5888
|
+
* That's really annoying as there is no way to remove the table
|
|
5889
|
+
* wrappers in that case.
|
|
5890
|
+
*/
|
|
5891
|
+
|
|
5892
|
+
var trimUnnecessaryTableWrapper = function trimUnnecessaryTableWrapper(node) {
|
|
5893
|
+
if (!slate.Element.isElement(node)) {
|
|
5894
|
+
return [node];
|
|
5895
|
+
} // must be a table with a single row
|
|
5896
|
+
|
|
5897
|
+
|
|
5898
|
+
if (node.type !== Contentful.BLOCKS.TABLE || node.children.length !== 1) {
|
|
5899
|
+
return [node];
|
|
5900
|
+
}
|
|
5901
|
+
|
|
5902
|
+
var row = node.children[0]; // the row must contain a single cell
|
|
5903
|
+
|
|
5904
|
+
if (row.children.length !== 1) {
|
|
5905
|
+
return [node];
|
|
5906
|
+
}
|
|
5907
|
+
|
|
5908
|
+
var cell = row.children[0];
|
|
5909
|
+
return cell.children;
|
|
5910
|
+
};
|
|
5911
|
+
|
|
5912
|
+
var insertTableFragment = function insertTableFragment(editor) {
|
|
5913
|
+
var insertFragment = editor.insertFragment;
|
|
5914
|
+
return function (fragments) {
|
|
5915
|
+
var _editor$selection;
|
|
5916
|
+
|
|
5917
|
+
if (!editor.selection) {
|
|
5918
|
+
return;
|
|
5919
|
+
}
|
|
5920
|
+
|
|
5921
|
+
fragments = fragments.flatMap(trimUnnecessaryTableWrapper); // We need to make sure we have a new, empty and clean paragraph in order to paste tables as-is due to how Slate behaves
|
|
5922
|
+
// More info: https://github.com/ianstormtaylor/slate/pull/4489 and https://github.com/ianstormtaylor/slate/issues/4542
|
|
5923
|
+
|
|
5924
|
+
var isInsertingTable = fragments.some(function (fragment) {
|
|
5925
|
+
return isTable(fragment);
|
|
5926
|
+
});
|
|
5927
|
+
var isTableFirstFragment = fragments.findIndex(function (fragment) {
|
|
5928
|
+
return isTable(fragment);
|
|
5929
|
+
}) === 0;
|
|
5930
|
+
var currentLineHasText = plateCore.getText(editor, (_editor$selection = editor.selection) == null ? void 0 : _editor$selection.focus.path) !== '';
|
|
5931
|
+
|
|
5932
|
+
if (isInsertingTable && isTableFirstFragment && currentLineHasText) {
|
|
5933
|
+
insertEmptyParagraph(editor);
|
|
5934
|
+
}
|
|
5935
|
+
|
|
5936
|
+
return insertFragment(fragments);
|
|
5937
|
+
};
|
|
5929
5938
|
};
|
|
5930
5939
|
|
|
5931
|
-
var
|
|
5940
|
+
var onKeyDownTable = function onKeyDownTable(editor, plugin) {
|
|
5932
5941
|
var defaultHandler = plateTable.onKeyDownTable(editor, plugin);
|
|
5933
5942
|
return function (event) {
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5943
|
+
// This fixes `Cannot resolve a Slate point from DOM point: [object HTMLDivElement]` when typing while the cursor is before table
|
|
5944
|
+
var windowSelection = window.getSelection();
|
|
5945
|
+
|
|
5946
|
+
if (windowSelection) {
|
|
5947
|
+
var _windowSelection$anch, _windowSelection$anch2;
|
|
5948
|
+
|
|
5949
|
+
// @ts-expect-error
|
|
5950
|
+
var blockType = (_windowSelection$anch = windowSelection.anchorNode.attributes) == null ? void 0 : (_windowSelection$anch2 = _windowSelection$anch['data-block-type']) == null ? void 0 : _windowSelection$anch2.value; // this attribute comes from `plugins/Table/components/Table.tsx`
|
|
5951
|
+
|
|
5952
|
+
var isBeforeTable = blockType === Contentful.BLOCKS.TABLE;
|
|
5953
|
+
|
|
5954
|
+
if (isBeforeTable) {
|
|
5955
|
+
if (event.key === 'Enter') {
|
|
5956
|
+
var above = plateCore.getAbove(editor, {
|
|
5957
|
+
match: {
|
|
5958
|
+
type: Contentful.BLOCKS.TABLE
|
|
5959
|
+
}
|
|
5960
|
+
});
|
|
5961
|
+
if (!above) return;
|
|
5962
|
+
var tablePath = above[1];
|
|
5963
|
+
insertEmptyParagraph(editor, {
|
|
5964
|
+
at: tablePath,
|
|
5965
|
+
select: true
|
|
5966
|
+
});
|
|
5967
|
+
}
|
|
5968
|
+
|
|
5969
|
+
event.preventDefault();
|
|
5970
|
+
event.stopPropagation();
|
|
5971
|
+
return;
|
|
5972
|
+
}
|
|
5973
|
+
} // Pressing Tab on the last cell creates a new row
|
|
5974
|
+
// Otherwise, jumping between cells is handled in the defaultKeyDownTable
|
|
5975
|
+
|
|
5976
|
+
|
|
5977
|
+
if (event.key === 'Tab' && !event.shiftKey) {
|
|
5938
5978
|
event.preventDefault();
|
|
5939
|
-
|
|
5940
|
-
|
|
5979
|
+
var res = plateTable.getTableCellEntry(editor, {});
|
|
5980
|
+
|
|
5981
|
+
if (res) {
|
|
5982
|
+
var tableElement = res.tableElement,
|
|
5983
|
+
tableRow = res.tableRow,
|
|
5984
|
+
tableCell = res.tableCell;
|
|
5985
|
+
var isLastCell = plateCore.isLastChild(tableRow, tableCell[1]);
|
|
5986
|
+
var isLastRow = plateCore.isLastChild(tableElement, tableRow[1]);
|
|
5987
|
+
|
|
5988
|
+
if (isLastRow && isLastCell) {
|
|
5989
|
+
addRowBelow(editor); // skip default handler
|
|
5990
|
+
|
|
5991
|
+
return;
|
|
5992
|
+
}
|
|
5993
|
+
}
|
|
5941
5994
|
}
|
|
5942
5995
|
|
|
5943
5996
|
defaultHandler(event);
|
|
@@ -5950,32 +6003,13 @@ var createTablePlugin = function createTablePlugin() {
|
|
|
5950
6003
|
return plateTable.createTablePlugin({
|
|
5951
6004
|
type: Contentful.BLOCKS.TABLE,
|
|
5952
6005
|
handlers: {
|
|
5953
|
-
onKeyDown:
|
|
6006
|
+
onKeyDown: onKeyDownTable
|
|
5954
6007
|
},
|
|
5955
|
-
withOverrides: function withOverrides(editor) {
|
|
6008
|
+
withOverrides: function withOverrides(editor, plugin) {
|
|
6009
|
+
// injects important fixes from plate's original table plugin
|
|
6010
|
+
plateTable.withTable(editor, plugin);
|
|
5956
6011
|
addTableTrackingEvents(editor);
|
|
5957
|
-
|
|
5958
|
-
|
|
5959
|
-
editor.insertFragment = function (fragments) {
|
|
5960
|
-
var _editor$selection;
|
|
5961
|
-
|
|
5962
|
-
// We need to make sure we have a new, empty and clean paragraph in order to paste tables as-is due to how Slate behaves
|
|
5963
|
-
// More info: https://github.com/ianstormtaylor/slate/pull/4489 and https://github.com/ianstormtaylor/slate/issues/4542
|
|
5964
|
-
var isInsertingTable = fragments.some(function (fragment) {
|
|
5965
|
-
return isTable(fragment);
|
|
5966
|
-
});
|
|
5967
|
-
var isTableFirstFragment = fragments.findIndex(function (fragment) {
|
|
5968
|
-
return isTable(fragment);
|
|
5969
|
-
}) === 0;
|
|
5970
|
-
var currentLineHasText = plateCore.getText(editor, (_editor$selection = editor.selection) == null ? void 0 : _editor$selection.focus.path) !== '';
|
|
5971
|
-
|
|
5972
|
-
if (isInsertingTable && isTableFirstFragment && currentLineHasText) {
|
|
5973
|
-
insertEmptyParagraph(editor);
|
|
5974
|
-
}
|
|
5975
|
-
|
|
5976
|
-
insertFragment(fragments);
|
|
5977
|
-
};
|
|
5978
|
-
|
|
6012
|
+
editor.insertFragment = insertTableFragment(editor);
|
|
5979
6013
|
return editor;
|
|
5980
6014
|
},
|
|
5981
6015
|
overrideByKey: (_overrideByKey = {}, _overrideByKey[plateTable.ELEMENT_TABLE] = {
|