@_sh/strapi-plugin-ckeditor 2.0.3 → 2.1.0
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/LICENSE +20 -20
- package/README.md +437 -448
- package/admin/src/components/CKEditorIcon.js +46 -46
- package/admin/src/components/Input/CKEditor/configs/base.js +636 -627
- package/admin/src/components/Input/CKEditor/configs/blockBalloon.js +25 -0
- package/admin/src/components/Input/CKEditor/configs/index.js +11 -11
- package/admin/src/components/Input/CKEditor/configs/toolbar.js +17 -17
- package/admin/src/components/Input/CKEditor/configs/toolbarBalloon.js +17 -0
- package/admin/src/components/Input/CKEditor/configuration.js +166 -165
- package/admin/src/components/Input/CKEditor/index.js +119 -119
- package/admin/src/components/Input/CKEditor/plugins/StrapiMediaLib.js +43 -43
- package/admin/src/components/Input/CKEditor/plugins/StrapiUploadAdapter.js +204 -203
- package/admin/src/components/Input/CKEditor/plugins/index.js +1 -1
- package/admin/src/components/Input/CKEditor/styling.js +16 -16
- package/admin/src/components/Input/CKEditor/theme/additional.js +186 -212
- package/admin/src/components/Input/CKEditor/theme/common.js +232 -232
- package/admin/src/components/Input/CKEditor/theme/dark.js +144 -144
- package/admin/src/components/Input/CKEditor/theme/index.js +12 -12
- package/admin/src/components/Input/CKEditor/theme/light.js +135 -135
- package/admin/src/components/Input/MediaLib/index.js +70 -79
- package/admin/src/components/Input/index.js +48 -48
- package/admin/src/index.js +110 -110
- package/admin/src/utils/getEditorConfig.js +37 -37
- package/admin/src/utils/pluginId.js +4 -4
- package/package.json +90 -86
- package/server/controllers/config.js +16 -16
- package/server/controllers/index.js +7 -7
- package/server/index.js +13 -13
- package/server/register.js +11 -11
- package/server/routes/index.js +15 -15
- package/server/services/config.js +19 -19
- package/server/services/index.js +7 -7
- package/strapi-admin.js +3 -3
- package/strapi-server.js +3 -3
- package/admin/src/components/Input/CKEditor/configs/blockBaloon.js +0 -25
- package/admin/src/components/Input/CKEditor/configs/toolbarBaloon.js +0 -17
|
@@ -1,628 +1,637 @@
|
|
|
1
|
-
import ckeditor5Dll from "ckeditor5/build/ckeditor5-dll.js";
|
|
2
|
-
import ckeditor5AlignmentDll from "@ckeditor/ckeditor5-alignment/build/alignment.js";
|
|
3
|
-
import ckeditor5AutoformatDll from "@ckeditor/ckeditor5-autoformat/build/autoformat.js";
|
|
4
|
-
import ckeditor5AutosaveDll from "@ckeditor/ckeditor5-autosave/build/autosave.js";
|
|
5
|
-
import ckeditor5BasicStylesDll from "@ckeditor/ckeditor5-basic-styles/build/basic-styles.js";
|
|
6
|
-
import ckeditor5BlockQuoteDll from "@ckeditor/ckeditor5-block-quote/build/block-quote.js";
|
|
7
|
-
import ckeditor5CodeBlockDll from "@ckeditor/ckeditor5-code-block/build/code-block.js";
|
|
8
|
-
import ckeditor5EssentialsDll from "@ckeditor/ckeditor5-essentials/build/essentials.js";
|
|
9
|
-
import ckeditor5HeadingDll from "@ckeditor/ckeditor5-heading/build/heading.js";
|
|
10
|
-
import ckeditor5HtmlEmbedDll from "@ckeditor/ckeditor5-html-embed/build/html-embed.js";
|
|
11
|
-
import ckeditor5HtmlSupportDll from "@ckeditor/ckeditor5-html-support/build/html-support.js";
|
|
12
|
-
import ckeditor5HorizontalLineDll from "@ckeditor/ckeditor5-horizontal-line/build/horizontal-line.js";
|
|
13
|
-
import ckeditor5MediaEmbedDll from "@ckeditor/ckeditor5-media-embed/build/media-embed.js";
|
|
14
|
-
import ckeditor5ImageDll from "@ckeditor/ckeditor5-image/build/image.js";
|
|
15
|
-
import ckeditor5IndentDll from "@ckeditor/ckeditor5-indent/build/indent.js";
|
|
16
|
-
import ckeditor5LinkDll from "@ckeditor/ckeditor5-link/build/link.js";
|
|
17
|
-
import ckeditor5ListDll from "@ckeditor/ckeditor5-list/build/list.js";
|
|
18
|
-
import ckeditor5PasteFromOfficeDll from "@ckeditor/ckeditor5-paste-from-office/build/paste-from-office.js";
|
|
19
|
-
import ckeditor5RemoveFormatDll from "@ckeditor/ckeditor5-remove-format/build/remove-format.js";
|
|
20
|
-
import ckeditor5TableDll from "@ckeditor/ckeditor5-table/build/table.js";
|
|
21
|
-
import ckeditor5WordCountDll from "@ckeditor/ckeditor5-word-count/build/word-count.js";
|
|
22
|
-
import ckeditor5FindAndReplaceDll from "@ckeditor/ckeditor5-find-and-replace/build/find-and-replace.js";
|
|
23
|
-
import ckeditor5SpecialCharactersDll from "@ckeditor/ckeditor5-special-characters/build/special-characters.js";
|
|
24
|
-
import ckeditor5PageBreakDll from "@ckeditor/ckeditor5-page-break/build/page-break.js";
|
|
25
|
-
import ckeditor5SourceEditingDll from "@ckeditor/ckeditor5-source-editing/build/source-editing.js";
|
|
26
|
-
import ckeditor5LanguageDll from "@ckeditor/ckeditor5-language/build/language.js";
|
|
27
|
-
import ckeditor5HighlightDll from "@ckeditor/ckeditor5-highlight/build/highlight.js";
|
|
28
|
-
import ckeditor5StyleDll from "@ckeditor/ckeditor5-style/build/style.js";
|
|
29
|
-
import ckeditor5MentionDll from "@ckeditor/ckeditor5-mention/build/mention.js";
|
|
30
|
-
import
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
import
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
{ label: "
|
|
120
|
-
{ label: "
|
|
121
|
-
{ label: "
|
|
122
|
-
{ label: "
|
|
123
|
-
{ label: "
|
|
124
|
-
{ label: "
|
|
125
|
-
{ label: "
|
|
126
|
-
{ label: "
|
|
127
|
-
{ label: "
|
|
128
|
-
{ label: "
|
|
129
|
-
{ label: "
|
|
130
|
-
{ label: "Blue
|
|
131
|
-
{ label: "
|
|
132
|
-
{ label: "
|
|
133
|
-
{ label: "
|
|
134
|
-
{ label: "
|
|
135
|
-
{ label: "
|
|
136
|
-
{ label: "
|
|
137
|
-
{ label: "
|
|
138
|
-
{ label: "
|
|
139
|
-
{ label: "
|
|
140
|
-
{ label: "
|
|
141
|
-
{ label: "
|
|
142
|
-
{ label: "Blue
|
|
143
|
-
{ label: "
|
|
144
|
-
{ label: "
|
|
145
|
-
{ label: "
|
|
146
|
-
{ label: "
|
|
147
|
-
{ label: "
|
|
148
|
-
{ label: "
|
|
149
|
-
{ label: "
|
|
150
|
-
{ label: "
|
|
151
|
-
{ label: "
|
|
152
|
-
{ label: "
|
|
153
|
-
{ label: "
|
|
154
|
-
{ label: "Blue
|
|
155
|
-
{ label: "
|
|
156
|
-
{ label: "
|
|
157
|
-
{ label: "
|
|
158
|
-
{ label: "
|
|
159
|
-
{ label: "
|
|
160
|
-
{ label: "
|
|
161
|
-
{ label: "
|
|
162
|
-
{ label: "
|
|
163
|
-
{ label: "
|
|
164
|
-
{ label: "
|
|
165
|
-
{ label: "
|
|
166
|
-
{ label: "Blue
|
|
167
|
-
{ label: "
|
|
168
|
-
{ label: "
|
|
169
|
-
{ label: "
|
|
170
|
-
{ label: "
|
|
171
|
-
{ label: "
|
|
172
|
-
{ label: "
|
|
173
|
-
{ label: "
|
|
174
|
-
{ label: "
|
|
175
|
-
{ label: "
|
|
176
|
-
{ label: "
|
|
177
|
-
{ label: "
|
|
178
|
-
{ label: "Blue
|
|
179
|
-
{ label: "
|
|
180
|
-
{ label: "
|
|
181
|
-
{ label: "
|
|
182
|
-
{ label: "
|
|
183
|
-
{ label: "
|
|
184
|
-
{ label: "
|
|
185
|
-
{ label: "
|
|
186
|
-
{ label: "
|
|
187
|
-
{ label: "
|
|
188
|
-
{ label: "
|
|
189
|
-
{ label: "
|
|
190
|
-
{ label: "Blue
|
|
191
|
-
{ label: "
|
|
192
|
-
{ label: "
|
|
193
|
-
{ label: "
|
|
194
|
-
{ label: "
|
|
195
|
-
{ label: "
|
|
196
|
-
{ label: "
|
|
197
|
-
{ label: "
|
|
198
|
-
{ label: "
|
|
199
|
-
{ label: "
|
|
200
|
-
{ label: "
|
|
201
|
-
{ label: "
|
|
202
|
-
{ label: "Blue
|
|
203
|
-
{ label: "
|
|
204
|
-
{ label: "
|
|
205
|
-
{ label: "
|
|
206
|
-
{ label: "
|
|
207
|
-
{ label: "
|
|
208
|
-
{ label: "
|
|
209
|
-
{ label: "
|
|
210
|
-
{ label: "
|
|
211
|
-
{ label: "
|
|
212
|
-
{ label: "
|
|
213
|
-
{ label: "
|
|
214
|
-
{ label: "Blue
|
|
215
|
-
{ label: "
|
|
216
|
-
{ label: "
|
|
217
|
-
{ label: "
|
|
218
|
-
{ label: "
|
|
219
|
-
{ label: "
|
|
220
|
-
{ label: "
|
|
221
|
-
{ label: "
|
|
222
|
-
{ label: "
|
|
223
|
-
{ label: "
|
|
224
|
-
{ label: "
|
|
225
|
-
{ label: "
|
|
226
|
-
{ label: "Blue
|
|
227
|
-
{ label: "
|
|
228
|
-
{ label: "
|
|
229
|
-
{ label: "
|
|
230
|
-
{ label: "
|
|
231
|
-
{ label: "
|
|
232
|
-
{ label: "
|
|
233
|
-
{ label: "
|
|
234
|
-
{ label: "
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
supportAllValues: true,
|
|
244
|
-
},
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
{ model: "
|
|
262
|
-
{ model: "
|
|
263
|
-
{ model: "
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
"
|
|
310
|
-
"
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
"
|
|
344
|
-
"
|
|
345
|
-
"
|
|
346
|
-
"
|
|
347
|
-
"
|
|
348
|
-
"
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
w.
|
|
435
|
-
w.
|
|
436
|
-
w.
|
|
437
|
-
w.
|
|
438
|
-
w.
|
|
439
|
-
w.
|
|
440
|
-
w.
|
|
441
|
-
w.
|
|
442
|
-
w.
|
|
443
|
-
w.
|
|
444
|
-
w.
|
|
445
|
-
w.
|
|
446
|
-
w.
|
|
447
|
-
w.
|
|
448
|
-
w.
|
|
449
|
-
w.
|
|
450
|
-
w.
|
|
451
|
-
w.
|
|
452
|
-
w.
|
|
453
|
-
w.
|
|
454
|
-
w.
|
|
455
|
-
w.
|
|
456
|
-
w.
|
|
457
|
-
w.
|
|
458
|
-
w.
|
|
459
|
-
w.
|
|
460
|
-
w.
|
|
461
|
-
w.
|
|
462
|
-
w.
|
|
463
|
-
w.
|
|
464
|
-
w.
|
|
465
|
-
w.
|
|
466
|
-
w.
|
|
467
|
-
w.
|
|
468
|
-
w.
|
|
469
|
-
w.
|
|
470
|
-
w.
|
|
471
|
-
w.
|
|
472
|
-
w.
|
|
473
|
-
w.
|
|
474
|
-
w.
|
|
475
|
-
w.
|
|
476
|
-
w.
|
|
477
|
-
w.
|
|
478
|
-
w.
|
|
479
|
-
w.
|
|
480
|
-
w.
|
|
481
|
-
w.
|
|
482
|
-
w.
|
|
483
|
-
w.
|
|
484
|
-
w.
|
|
485
|
-
w.
|
|
486
|
-
w.
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
{
|
|
507
|
-
label:' ',
|
|
508
|
-
tooltip: null,
|
|
509
|
-
icon
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
'
|
|
525
|
-
'|',
|
|
526
|
-
'
|
|
527
|
-
'
|
|
528
|
-
'
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
'
|
|
551
|
-
'
|
|
552
|
-
'
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
'
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
pluginName !== "
|
|
585
|
-
pluginName !== "
|
|
586
|
-
pluginName !== "
|
|
587
|
-
pluginName !== "
|
|
588
|
-
pluginName !== "
|
|
589
|
-
pluginName !== "
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
'|',
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
'
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
1
|
+
import ckeditor5Dll from "ckeditor5/build/ckeditor5-dll.js";
|
|
2
|
+
import ckeditor5AlignmentDll from "@ckeditor/ckeditor5-alignment/build/alignment.js";
|
|
3
|
+
import ckeditor5AutoformatDll from "@ckeditor/ckeditor5-autoformat/build/autoformat.js";
|
|
4
|
+
import ckeditor5AutosaveDll from "@ckeditor/ckeditor5-autosave/build/autosave.js";
|
|
5
|
+
import ckeditor5BasicStylesDll from "@ckeditor/ckeditor5-basic-styles/build/basic-styles.js";
|
|
6
|
+
import ckeditor5BlockQuoteDll from "@ckeditor/ckeditor5-block-quote/build/block-quote.js";
|
|
7
|
+
import ckeditor5CodeBlockDll from "@ckeditor/ckeditor5-code-block/build/code-block.js";
|
|
8
|
+
import ckeditor5EssentialsDll from "@ckeditor/ckeditor5-essentials/build/essentials.js";
|
|
9
|
+
import ckeditor5HeadingDll from "@ckeditor/ckeditor5-heading/build/heading.js";
|
|
10
|
+
import ckeditor5HtmlEmbedDll from "@ckeditor/ckeditor5-html-embed/build/html-embed.js";
|
|
11
|
+
import ckeditor5HtmlSupportDll from "@ckeditor/ckeditor5-html-support/build/html-support.js";
|
|
12
|
+
import ckeditor5HorizontalLineDll from "@ckeditor/ckeditor5-horizontal-line/build/horizontal-line.js";
|
|
13
|
+
import ckeditor5MediaEmbedDll from "@ckeditor/ckeditor5-media-embed/build/media-embed.js";
|
|
14
|
+
import ckeditor5ImageDll from "@ckeditor/ckeditor5-image/build/image.js";
|
|
15
|
+
import ckeditor5IndentDll from "@ckeditor/ckeditor5-indent/build/indent.js";
|
|
16
|
+
import ckeditor5LinkDll from "@ckeditor/ckeditor5-link/build/link.js";
|
|
17
|
+
import ckeditor5ListDll from "@ckeditor/ckeditor5-list/build/list.js";
|
|
18
|
+
import ckeditor5PasteFromOfficeDll from "@ckeditor/ckeditor5-paste-from-office/build/paste-from-office.js";
|
|
19
|
+
import ckeditor5RemoveFormatDll from "@ckeditor/ckeditor5-remove-format/build/remove-format.js";
|
|
20
|
+
import ckeditor5TableDll from "@ckeditor/ckeditor5-table/build/table.js";
|
|
21
|
+
import ckeditor5WordCountDll from "@ckeditor/ckeditor5-word-count/build/word-count.js";
|
|
22
|
+
import ckeditor5FindAndReplaceDll from "@ckeditor/ckeditor5-find-and-replace/build/find-and-replace.js";
|
|
23
|
+
import ckeditor5SpecialCharactersDll from "@ckeditor/ckeditor5-special-characters/build/special-characters.js";
|
|
24
|
+
import ckeditor5PageBreakDll from "@ckeditor/ckeditor5-page-break/build/page-break.js";
|
|
25
|
+
import ckeditor5SourceEditingDll from "@ckeditor/ckeditor5-source-editing/build/source-editing.js";
|
|
26
|
+
import ckeditor5LanguageDll from "@ckeditor/ckeditor5-language/build/language.js";
|
|
27
|
+
import ckeditor5HighlightDll from "@ckeditor/ckeditor5-highlight/build/highlight.js";
|
|
28
|
+
import ckeditor5StyleDll from "@ckeditor/ckeditor5-style/build/style.js";
|
|
29
|
+
import ckeditor5MentionDll from "@ckeditor/ckeditor5-mention/build/mention.js";
|
|
30
|
+
import ckeditor5FontDll from "@ckeditor/ckeditor5-font/build/font.js";
|
|
31
|
+
import ckeditor5ShowBlocksDll from "@ckeditor/ckeditor5-show-blocks/build/show-blocks.js";
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
import sanitizeHtml from "sanitize-html";
|
|
35
|
+
|
|
36
|
+
import * as strapiPlugins from '../plugins'
|
|
37
|
+
window.CKEditor5.strapiPlugins = strapiPlugins;
|
|
38
|
+
|
|
39
|
+
const w = {
|
|
40
|
+
Alignment: window.CKEditor5.alignment.Alignment,
|
|
41
|
+
Autoformat: window.CKEditor5.autoformat.Autoformat,
|
|
42
|
+
AutoImage: window.CKEditor5.image.AutoImage,
|
|
43
|
+
AutoLink: window.CKEditor5.link.AutoLink,
|
|
44
|
+
Autosave: window.CKEditor5.autosave.Autosave,
|
|
45
|
+
BalloonToolbar: window.CKEditor5.ui.BalloonToolbar,
|
|
46
|
+
BlockQuote: window.CKEditor5.blockQuote.BlockQuote,
|
|
47
|
+
BlockToolbar: window.CKEditor5.ui.BlockToolbar,
|
|
48
|
+
Bold: window.CKEditor5.basicStyles.Bold,
|
|
49
|
+
Code: window.CKEditor5.basicStyles.Code,
|
|
50
|
+
CodeBlock: window.CKEditor5.codeBlock.CodeBlock,
|
|
51
|
+
DataFilter: window.CKEditor5.htmlSupport.DataFilter,
|
|
52
|
+
DataSchema: window.CKEditor5.htmlSupport.DataSchema,
|
|
53
|
+
DocumentList: window.CKEditor5.list.DocumentList,
|
|
54
|
+
DocumentListProperties: window.CKEditor5.list.DocumentListProperties,
|
|
55
|
+
Essentials: window.CKEditor5.essentials.Essentials,
|
|
56
|
+
FindAndReplace: window.CKEditor5.findAndReplace.FindAndReplace,
|
|
57
|
+
FontBackgroundColor: window.CKEditor5.font.FontBackgroundColor,
|
|
58
|
+
FontColor: window.CKEditor5.font.FontColor,
|
|
59
|
+
FontFamily: window.CKEditor5.font.FontFamily,
|
|
60
|
+
FontSize: window.CKEditor5.font.FontSize,
|
|
61
|
+
GeneralHtmlSupport: window.CKEditor5.htmlSupport.GeneralHtmlSupport,
|
|
62
|
+
Heading: window.CKEditor5.heading.Heading,
|
|
63
|
+
// HeadingButtonsUI: window.CKEditor5.heading.HeadingButtonsUI,
|
|
64
|
+
Highlight: window.CKEditor5.highlight.Highlight,
|
|
65
|
+
HorizontalLine: window.CKEditor5.horizontalLine.HorizontalLine,
|
|
66
|
+
HtmlComment: window.CKEditor5.htmlSupport.HtmlComment,
|
|
67
|
+
HtmlEmbed: window.CKEditor5.htmlEmbed.HtmlEmbed,
|
|
68
|
+
Image: window.CKEditor5.image.Image,
|
|
69
|
+
ImageCaption: window.CKEditor5.image.ImageCaption,
|
|
70
|
+
ImageInsert: window.CKEditor5.image.ImageInsert,
|
|
71
|
+
ImageResize: window.CKEditor5.image.ImageResize,
|
|
72
|
+
ImageStyle: window.CKEditor5.image.ImageStyle,
|
|
73
|
+
ImageToolbar: window.CKEditor5.image.ImageToolbar,
|
|
74
|
+
ImageUpload: window.CKEditor5.image.ImageUpload,
|
|
75
|
+
Indent: window.CKEditor5.indent.Indent,
|
|
76
|
+
IndentBlock: window.CKEditor5.indent.IndentBlock,
|
|
77
|
+
Italic: window.CKEditor5.basicStyles.Italic,
|
|
78
|
+
Link: window.CKEditor5.link.Link,
|
|
79
|
+
LinkImage: window.CKEditor5.link.LinkImage,
|
|
80
|
+
List: window.CKEditor5.list.List,
|
|
81
|
+
ListProperties: window.CKEditor5.list.ListProperties,
|
|
82
|
+
MediaEmbed: window.CKEditor5.mediaEmbed.MediaEmbed,
|
|
83
|
+
MediaEmbedToolbar: window.CKEditor5.mediaEmbed.MediaEmbedToolbar,
|
|
84
|
+
Mention: window.CKEditor5.mention.Mention,
|
|
85
|
+
PageBreak: window.CKEditor5.pageBreak.PageBreak,
|
|
86
|
+
Paragraph: window.CKEditor5.paragraph.Paragraph,
|
|
87
|
+
// ParagraphButtonUI: window.CKEditor5.paragraph.ParagraphButtonUI,
|
|
88
|
+
PasteFromOffice: window.CKEditor5.pasteFromOffice.PasteFromOffice,
|
|
89
|
+
PictureEditing: window.CKEditor5.image.PictureEditing,
|
|
90
|
+
RemoveFormat: window.CKEditor5.removeFormat.RemoveFormat,
|
|
91
|
+
SourceEditing: window.CKEditor5.sourceEditing.SourceEditing,
|
|
92
|
+
SpecialCharacters: window.CKEditor5.specialCharacters.SpecialCharacters,
|
|
93
|
+
SpecialCharactersArrows: window.CKEditor5.specialCharacters.SpecialCharactersArrows,
|
|
94
|
+
SpecialCharactersCurrency: window.CKEditor5.specialCharacters.SpecialCharactersCurrency,
|
|
95
|
+
// SpecialCharactersEssentials: window.CKEditor5.specialCharacters.SpecialCharactersEssentials,
|
|
96
|
+
SpecialCharactersLatin: window.CKEditor5.specialCharacters.SpecialCharactersLatin,
|
|
97
|
+
SpecialCharactersMathematical: window.CKEditor5.specialCharacters.SpecialCharactersMathematical,
|
|
98
|
+
SpecialCharactersText: window.CKEditor5.specialCharacters.SpecialCharactersText,
|
|
99
|
+
StrapiMediaLib: window.CKEditor5.strapiPlugins.StrapiMediaLib,
|
|
100
|
+
StrapiUploadAdapter: window.CKEditor5.strapiPlugins.StrapiUploadAdapter,
|
|
101
|
+
Strikethrough: window.CKEditor5.basicStyles.Strikethrough,
|
|
102
|
+
Style: window.CKEditor5.style.Style,
|
|
103
|
+
Subscript: window.CKEditor5.basicStyles.Subscript,
|
|
104
|
+
Superscript: window.CKEditor5.basicStyles.Superscript,
|
|
105
|
+
ShowBlocks: window.CKEditor5.showBlocks.ShowBlocks,
|
|
106
|
+
Table: window.CKEditor5.table.Table,
|
|
107
|
+
TableCaption: window.CKEditor5.table.TableCaption,
|
|
108
|
+
TableCellProperties: window.CKEditor5.table.TableCellProperties,
|
|
109
|
+
TableColumnResize: window.CKEditor5.table.TableColumnResize,
|
|
110
|
+
TableProperties: window.CKEditor5.table.TableProperties,
|
|
111
|
+
TableToolbar: window.CKEditor5.table.TableToolbar,
|
|
112
|
+
TextPartLanguage: window.CKEditor5.language.TextPartLanguage,
|
|
113
|
+
TodoList: window.CKEditor5.list.TodoList,
|
|
114
|
+
Underline: window.CKEditor5.basicStyles.Underline,
|
|
115
|
+
WordCount: window.CKEditor5.wordCount.WordCount
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const REDUCED_MATERIAL_COLORS = [
|
|
119
|
+
{ label: "Red 50", color: "#ffebee" },
|
|
120
|
+
{ label: "Purple 50", color: "#f3e5f5" },
|
|
121
|
+
{ label: "Indigo 50", color: "#e8eaf6" },
|
|
122
|
+
{ label: "Blue 50", color: "#e3f2fd" },
|
|
123
|
+
{ label: "Cyan 50", color: "#e0f7fa" },
|
|
124
|
+
{ label: "Teal 50", color: "#e0f2f1" },
|
|
125
|
+
{ label: "Light green 50", color: "#f1f8e9" },
|
|
126
|
+
{ label: "Lime 50", color: "#f9fbe7" },
|
|
127
|
+
{ label: "Amber 50", color: "#fff8e1" },
|
|
128
|
+
{ label: "Orange 50", color: "#fff3e0" },
|
|
129
|
+
{ label: "Grey 50", color: "#fafafa" },
|
|
130
|
+
{ label: "Blue grey 50", color: "#eceff1" },
|
|
131
|
+
{ label: "Red 100", color: "#ffcdd2" },
|
|
132
|
+
{ label: "Purple 100", color: "#e1bee7" },
|
|
133
|
+
{ label: "Indigo 100", color: "#c5cae9" },
|
|
134
|
+
{ label: "Blue 100", color: "#bbdefb" },
|
|
135
|
+
{ label: "Cyan 100", color: "#b2ebf2" },
|
|
136
|
+
{ label: "Teal 100", color: "#b2dfdb" },
|
|
137
|
+
{ label: "Light green 100", color: "#dcedc8" },
|
|
138
|
+
{ label: "Lime 100", color: "#f0f4c3" },
|
|
139
|
+
{ label: "Amber 100", color: "#ffecb3" },
|
|
140
|
+
{ label: "Orange 100", color: "#ffe0b2" },
|
|
141
|
+
{ label: "Grey 100", color: "#f5f5f5" },
|
|
142
|
+
{ label: "Blue grey 100", color: "#cfd8dc" },
|
|
143
|
+
{ label: "Red 200", color: "#ef9a9a" },
|
|
144
|
+
{ label: "Purple 200", color: "#ce93d8" },
|
|
145
|
+
{ label: "Indigo 200", color: "#9fa8da" },
|
|
146
|
+
{ label: "Blue 200", color: "#90caf9" },
|
|
147
|
+
{ label: "Cyan 200", color: "#80deea" },
|
|
148
|
+
{ label: "Teal 200", color: "#80cbc4" },
|
|
149
|
+
{ label: "Light green 200", color: "#c5e1a5" },
|
|
150
|
+
{ label: "Lime 200", color: "#e6ee9c" },
|
|
151
|
+
{ label: "Amber 200", color: "#ffe082" },
|
|
152
|
+
{ label: "Orange 200", color: "#ffcc80" },
|
|
153
|
+
{ label: "Grey 200", color: "#eeeeee" },
|
|
154
|
+
{ label: "Blue grey 200", color: "#b0bec5" },
|
|
155
|
+
{ label: "Red 300", color: "#e57373" },
|
|
156
|
+
{ label: "Purple 300", color: "#ba68c8" },
|
|
157
|
+
{ label: "Indigo 300", color: "#7986cb" },
|
|
158
|
+
{ label: "Blue 300", color: "#64b5f6" },
|
|
159
|
+
{ label: "Cyan 300", color: "#4dd0e1" },
|
|
160
|
+
{ label: "Teal 300", color: "#4db6ac" },
|
|
161
|
+
{ label: "Light green 300", color: "#aed581" },
|
|
162
|
+
{ label: "Lime 300", color: "#dce775" },
|
|
163
|
+
{ label: "Amber 300", color: "#ffd54f" },
|
|
164
|
+
{ label: "Orange 300", color: "#ffb74d" },
|
|
165
|
+
{ label: "Grey 300", color: "#e0e0e0" },
|
|
166
|
+
{ label: "Blue grey 300", color: "#90a4ae" },
|
|
167
|
+
{ label: "Red 400", color: "#ef5350" },
|
|
168
|
+
{ label: "Purple 400", color: "#ab47bc" },
|
|
169
|
+
{ label: "Indigo 400", color: "#5c6bc0" },
|
|
170
|
+
{ label: "Blue 400", color: "#42a5f5" },
|
|
171
|
+
{ label: "Cyan 400", color: "#26c6da" },
|
|
172
|
+
{ label: "Teal 400", color: "#26a69a" },
|
|
173
|
+
{ label: "Light green 400", color: "#9ccc65" },
|
|
174
|
+
{ label: "Lime 400", color: "#d4e157" },
|
|
175
|
+
{ label: "Amber 400", color: "#ffca28" },
|
|
176
|
+
{ label: "Orange 400", color: "#ffa726" },
|
|
177
|
+
{ label: "Grey 400", color: "#bdbdbd" },
|
|
178
|
+
{ label: "Blue grey 400", color: "#78909c" },
|
|
179
|
+
{ label: "Red 500", color: "#f44336" },
|
|
180
|
+
{ label: "Purple 500", color: "#9c27b0" },
|
|
181
|
+
{ label: "Indigo 500", color: "#3f51b5" },
|
|
182
|
+
{ label: "Blue 500", color: "#2196f3" },
|
|
183
|
+
{ label: "Cyan 500", color: "#00bcd4" },
|
|
184
|
+
{ label: "Teal 500", color: "#009688" },
|
|
185
|
+
{ label: "Light green 500", color: "#8bc34a" },
|
|
186
|
+
{ label: "Lime 500", color: "#cddc39" },
|
|
187
|
+
{ label: "Amber 500", color: "#ffc107" },
|
|
188
|
+
{ label: "Orange 500", color: "#ff9800" },
|
|
189
|
+
{ label: "Grey 500", color: "#9e9e9e" },
|
|
190
|
+
{ label: "Blue grey 500", color: "#607d8b" },
|
|
191
|
+
{ label: "Red 600", color: "#e53935" },
|
|
192
|
+
{ label: "Purple 600", color: "#8e24aa" },
|
|
193
|
+
{ label: "Indigo 600", color: "#3949ab" },
|
|
194
|
+
{ label: "Blue 600", color: "#1e88e5" },
|
|
195
|
+
{ label: "Cyan 600", color: "#00acc1" },
|
|
196
|
+
{ label: "Teal 600", color: "#00897b" },
|
|
197
|
+
{ label: "Light green 600", color: "#7cb342" },
|
|
198
|
+
{ label: "Lime 600", color: "#c0ca33" },
|
|
199
|
+
{ label: "Amber 600", color: "#ffb300" },
|
|
200
|
+
{ label: "Orange 600", color: "#fb8c00" },
|
|
201
|
+
{ label: "Grey 600", color: "#757575" },
|
|
202
|
+
{ label: "Blue grey 600", color: "#546e7a" },
|
|
203
|
+
{ label: "Red 700", color: "#d32f2f" },
|
|
204
|
+
{ label: "Purple 700", color: "#7b1fa2" },
|
|
205
|
+
{ label: "Indigo 700", color: "#303f9f" },
|
|
206
|
+
{ label: "Blue 700", color: "#1976d2" },
|
|
207
|
+
{ label: "Cyan 700", color: "#0097a7" },
|
|
208
|
+
{ label: "Teal 700", color: "#00796b" },
|
|
209
|
+
{ label: "Light green 700", color: "#689f38" },
|
|
210
|
+
{ label: "Lime 700", color: "#afb42b" },
|
|
211
|
+
{ label: "Amber 700", color: "#ffa000" },
|
|
212
|
+
{ label: "Orange 700", color: "#f57c00" },
|
|
213
|
+
{ label: "Grey 700", color: "#616161" },
|
|
214
|
+
{ label: "Blue grey 700", color: "#455a64" },
|
|
215
|
+
{ label: "Red 800", color: "#c62828" },
|
|
216
|
+
{ label: "Purple 800", color: "#6a1b9a" },
|
|
217
|
+
{ label: "Indigo 800", color: "#283593" },
|
|
218
|
+
{ label: "Blue 800", color: "#1565c0" },
|
|
219
|
+
{ label: "Cyan 800", color: "#00838f" },
|
|
220
|
+
{ label: "Teal 800", color: "#00695c" },
|
|
221
|
+
{ label: "Light green 800", color: "#558b2f" },
|
|
222
|
+
{ label: "Lime 800", color: "#9e9d24" },
|
|
223
|
+
{ label: "Amber 800", color: "#ff8f00" },
|
|
224
|
+
{ label: "Orange 800", color: "#ef6c00" },
|
|
225
|
+
{ label: "Grey 800", color: "#424242" },
|
|
226
|
+
{ label: "Blue grey 800", color: "#37474f" },
|
|
227
|
+
{ label: "Red 900", color: "#b71c1c" },
|
|
228
|
+
{ label: "Purple 900", color: "#4a148c" },
|
|
229
|
+
{ label: "Indigo 900", color: "#1a237e" },
|
|
230
|
+
{ label: "Blue 900", color: "#0d47a1" },
|
|
231
|
+
{ label: "Cyan 900", color: "#006064" },
|
|
232
|
+
{ label: "Teal 900", color: "#004d40" },
|
|
233
|
+
{ label: "Light green 900", color: "#33691e" },
|
|
234
|
+
{ label: "Lime 900", color: "#827717" },
|
|
235
|
+
{ label: "Amber 900", color: "#ff6f00" },
|
|
236
|
+
{ label: "Orange 900", color: "#e65100" },
|
|
237
|
+
{ label: "Grey 900", color: "#212121" },
|
|
238
|
+
{ label: "Blue grey 900", color: "#263238" },
|
|
239
|
+
];
|
|
240
|
+
|
|
241
|
+
const base = {
|
|
242
|
+
fontFamily: {
|
|
243
|
+
supportAllValues: true,
|
|
244
|
+
},
|
|
245
|
+
fontSize: {
|
|
246
|
+
options: [10, 12, 14, "default", 18, 20, 22],
|
|
247
|
+
supportAllValues: true,
|
|
248
|
+
},
|
|
249
|
+
fontColor: {
|
|
250
|
+
columns: 12,
|
|
251
|
+
documentColors: 12,
|
|
252
|
+
colors: REDUCED_MATERIAL_COLORS,
|
|
253
|
+
},
|
|
254
|
+
fontBackgroundColor: {
|
|
255
|
+
columns: 12,
|
|
256
|
+
documentColors: 12,
|
|
257
|
+
colors: REDUCED_MATERIAL_COLORS,
|
|
258
|
+
},
|
|
259
|
+
heading: {
|
|
260
|
+
options: [
|
|
261
|
+
{ model: "paragraph", title: "Paragraph", class: "ck-heading_paragraph" },
|
|
262
|
+
{ model: "heading1", view: "h1", title: "Heading 1", class: "ck-heading_heading1" },
|
|
263
|
+
{ model: "heading2", view: "h2", title: "Heading 2", class: "ck-heading_heading2" },
|
|
264
|
+
{ model: "heading3", view: "h3", title: "Heading 3", class: "ck-heading_heading3" },
|
|
265
|
+
{ model: "heading4", view: "h4", title: "Heading 4", class: "ck-heading_heading4" },
|
|
266
|
+
{ model: "heading5", view: "h5", title: "Heading 5", class: "ck-heading_heading5" },
|
|
267
|
+
{ model: "heading6", view: "h6", title: "Heading 6", class: "ck-heading_heading6" },
|
|
268
|
+
],
|
|
269
|
+
},
|
|
270
|
+
htmlSupport: {
|
|
271
|
+
allow: [
|
|
272
|
+
{
|
|
273
|
+
name: /.*/,
|
|
274
|
+
attributes: true,
|
|
275
|
+
classes: true,
|
|
276
|
+
styles: true,
|
|
277
|
+
},
|
|
278
|
+
],
|
|
279
|
+
disallow: [
|
|
280
|
+
{
|
|
281
|
+
attributes: [
|
|
282
|
+
{ key: /^on(.*)/i, value: true },
|
|
283
|
+
{ key: /.*/, value: /(\b)(on\S+)(\s*)=|javascript:|(<\s*)(\/*)script/i },
|
|
284
|
+
{ key: /.*/, value: /data:(?!image\/(png|jpeg|gif|webp))/i },
|
|
285
|
+
],
|
|
286
|
+
},
|
|
287
|
+
{ name: "script" },
|
|
288
|
+
],
|
|
289
|
+
},
|
|
290
|
+
htmlEmbed: {
|
|
291
|
+
showPreviews: true,
|
|
292
|
+
sanitizeHtml: (inputHtml) => {
|
|
293
|
+
const outputHtml = sanitizeHtml(inputHtml);
|
|
294
|
+
return {
|
|
295
|
+
html: outputHtml,
|
|
296
|
+
hasChanged: true,
|
|
297
|
+
};
|
|
298
|
+
},
|
|
299
|
+
},
|
|
300
|
+
list: {
|
|
301
|
+
properties: {
|
|
302
|
+
styles: true,
|
|
303
|
+
startIndex: true,
|
|
304
|
+
reversed: true,
|
|
305
|
+
},
|
|
306
|
+
},
|
|
307
|
+
table: {
|
|
308
|
+
contentToolbar: [
|
|
309
|
+
"tableColumn",
|
|
310
|
+
"tableRow",
|
|
311
|
+
"mergeTableCells",
|
|
312
|
+
"tableProperties",
|
|
313
|
+
"tableCellProperties",
|
|
314
|
+
"toggleTableCaption",
|
|
315
|
+
],
|
|
316
|
+
},
|
|
317
|
+
image: {
|
|
318
|
+
styles: {
|
|
319
|
+
options: [
|
|
320
|
+
'inline', 'alignLeft', 'alignRight',
|
|
321
|
+
'alignCenter', 'alignBlockLeft', 'alignBlockRight',
|
|
322
|
+
'block', 'side'
|
|
323
|
+
]
|
|
324
|
+
},
|
|
325
|
+
resizeOptions: [
|
|
326
|
+
{
|
|
327
|
+
name: "resizeImage:original",
|
|
328
|
+
label: "Default image width",
|
|
329
|
+
value: null,
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
name: "resizeImage:50",
|
|
333
|
+
label: "50% page width",
|
|
334
|
+
value: "50",
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
name: "resizeImage:75",
|
|
338
|
+
label: "75% page width",
|
|
339
|
+
value: "75",
|
|
340
|
+
},
|
|
341
|
+
],
|
|
342
|
+
toolbar: [
|
|
343
|
+
"imageTextAlternative",
|
|
344
|
+
"toggleImageCaption",
|
|
345
|
+
"linkImage",
|
|
346
|
+
"|",
|
|
347
|
+
"imageStyle:inline",
|
|
348
|
+
"imageStyle:wrapText",
|
|
349
|
+
"imageStyle:breakText",
|
|
350
|
+
"imageStyle:side",
|
|
351
|
+
"|",
|
|
352
|
+
"resizeImage",
|
|
353
|
+
],
|
|
354
|
+
insert: {
|
|
355
|
+
integrations: ["insertImageViaUrl"],
|
|
356
|
+
},
|
|
357
|
+
},
|
|
358
|
+
link: {
|
|
359
|
+
decorators: {
|
|
360
|
+
openInNewTab: {
|
|
361
|
+
mode: "manual",
|
|
362
|
+
label: "Open in a new tab",
|
|
363
|
+
defaultValue: true,
|
|
364
|
+
attributes: {
|
|
365
|
+
target: "_blank",
|
|
366
|
+
rel: "noopener noreferrer",
|
|
367
|
+
},
|
|
368
|
+
},
|
|
369
|
+
toggleDownloadable: {
|
|
370
|
+
mode: "manual",
|
|
371
|
+
label: "Downloadable",
|
|
372
|
+
attributes: {
|
|
373
|
+
download: "file",
|
|
374
|
+
},
|
|
375
|
+
},
|
|
376
|
+
},
|
|
377
|
+
addTargetToExternalLinks: true,
|
|
378
|
+
defaultProtocol: "https://",
|
|
379
|
+
},
|
|
380
|
+
style: {
|
|
381
|
+
definitions: [
|
|
382
|
+
{
|
|
383
|
+
name: "Title",
|
|
384
|
+
element: "h1",
|
|
385
|
+
classes: ["document-title"],
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
name: "Subtitle",
|
|
389
|
+
element: "h2",
|
|
390
|
+
classes: ["document-subtitle"],
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
name: "Callout",
|
|
394
|
+
element: "p",
|
|
395
|
+
classes: ["callout"],
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
name: "Side quote",
|
|
399
|
+
element: "blockquote",
|
|
400
|
+
classes: ["side-quote"],
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
name: "Needs clarification",
|
|
404
|
+
element: "span",
|
|
405
|
+
classes: ["needs-clarification"],
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
name: "Wide spacing",
|
|
409
|
+
element: "span",
|
|
410
|
+
classes: ["wide-spacing"],
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
name: "Small caps",
|
|
414
|
+
element: "span",
|
|
415
|
+
classes: ["small-caps"],
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
name: "Code (dark)",
|
|
419
|
+
element: "pre",
|
|
420
|
+
classes: ["stylish-code", "stylish-code-dark"],
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
name: "Code (bright)",
|
|
424
|
+
element: "pre",
|
|
425
|
+
classes: ["stylish-code", "stylish-code-bright"],
|
|
426
|
+
},
|
|
427
|
+
],
|
|
428
|
+
},
|
|
429
|
+
};
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
const basePlugins = [
|
|
434
|
+
w.Alignment,
|
|
435
|
+
w.Autoformat,
|
|
436
|
+
w.AutoImage,
|
|
437
|
+
w.BlockQuote,
|
|
438
|
+
w.Bold,
|
|
439
|
+
w.Code,
|
|
440
|
+
w.CodeBlock,
|
|
441
|
+
w.DocumentList,
|
|
442
|
+
w.DocumentListProperties,
|
|
443
|
+
w.Essentials,
|
|
444
|
+
w.FontBackgroundColor,
|
|
445
|
+
w.FontColor,
|
|
446
|
+
w.FontFamily,
|
|
447
|
+
w.FontSize,
|
|
448
|
+
w.GeneralHtmlSupport,
|
|
449
|
+
w.Heading,
|
|
450
|
+
w.HorizontalLine,
|
|
451
|
+
w.HtmlEmbed,
|
|
452
|
+
w.Image,
|
|
453
|
+
w.ImageCaption,
|
|
454
|
+
w.ImageInsert,
|
|
455
|
+
w.ImageResize,
|
|
456
|
+
w.ImageStyle,
|
|
457
|
+
w.ImageToolbar,
|
|
458
|
+
w.ImageUpload,
|
|
459
|
+
w.Indent,
|
|
460
|
+
w.IndentBlock,
|
|
461
|
+
w.Italic,
|
|
462
|
+
w.Link,
|
|
463
|
+
w.LinkImage,
|
|
464
|
+
w.LinkImage,
|
|
465
|
+
w.MediaEmbed,
|
|
466
|
+
w.PageBreak,
|
|
467
|
+
w.Paragraph,
|
|
468
|
+
w.PasteFromOffice,
|
|
469
|
+
w.PictureEditing,
|
|
470
|
+
w.RemoveFormat,
|
|
471
|
+
w.SourceEditing,
|
|
472
|
+
w.SpecialCharacters,
|
|
473
|
+
w.SpecialCharactersArrows,
|
|
474
|
+
w.SpecialCharactersCurrency,
|
|
475
|
+
w.SpecialCharactersLatin,
|
|
476
|
+
w.SpecialCharactersMathematical,
|
|
477
|
+
w.SpecialCharactersText,
|
|
478
|
+
w.StrapiMediaLib,
|
|
479
|
+
w.StrapiUploadAdapter,
|
|
480
|
+
w.Strikethrough,
|
|
481
|
+
w.Style,
|
|
482
|
+
w.Subscript,
|
|
483
|
+
w.Superscript,
|
|
484
|
+
w.ShowBlocks,
|
|
485
|
+
w.Table,
|
|
486
|
+
w.TableCaption,
|
|
487
|
+
w.TableCellProperties,
|
|
488
|
+
w.TableColumnResize,
|
|
489
|
+
w.TableProperties,
|
|
490
|
+
w.TableToolbar,
|
|
491
|
+
w.Underline,
|
|
492
|
+
w.WordCount,
|
|
493
|
+
];
|
|
494
|
+
|
|
495
|
+
export const toolbarEditorConfig = {
|
|
496
|
+
plugins:basePlugins,
|
|
497
|
+
...base,
|
|
498
|
+
toolbar: [
|
|
499
|
+
{
|
|
500
|
+
label:' ',
|
|
501
|
+
tooltip: null,
|
|
502
|
+
icon:'paragraph',
|
|
503
|
+
items: [ 'heading','style','SourceEditing']
|
|
504
|
+
},
|
|
505
|
+
'|',
|
|
506
|
+
{
|
|
507
|
+
label:' ',
|
|
508
|
+
tooltip: null,
|
|
509
|
+
icon:'text',
|
|
510
|
+
items: [ 'bold', 'italic','fontSize', 'fontFamily', 'fontColor', 'fontBackgroundColor' ]
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
label:' ',
|
|
514
|
+
tooltip: null,
|
|
515
|
+
icon:`
|
|
516
|
+
<svg width="800px" height="800px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
517
|
+
<rect x="0" fill="none" width="24" height="24"/>
|
|
518
|
+
<g>
|
|
519
|
+
<path d="M14.348 12H21v2h-4.613c.24.515.368 1.094.368 1.748 0 1.317-.474 2.355-1.423 3.114-.947.76-2.266 1.138-3.956 1.138-1.557 0-2.934-.293-4.132-.878v-2.874c.985.44 1.818.75 2.5.928.682.18 1.306.27 1.872.27.68 0 1.2-.13 1.562-.39.363-.26.545-.644.545-1.158 0-.285-.08-.54-.24-.763-.16-.222-.394-.437-.704-.643-.18-.12-.483-.287-.88-.49H3v-2H14.347zm-3.528-2c-.073-.077-.143-.155-.193-.235-.126-.202-.19-.44-.19-.713 0-.44.157-.795.47-1.068.313-.273.762-.41 1.348-.41.492 0 .993.064 1.502.19.51.127 1.153.35 1.93.67l1-2.405c-.753-.327-1.473-.58-2.16-.76-.69-.18-1.414-.27-2.173-.27-1.544 0-2.753.37-3.628 1.108-.874.738-1.312 1.753-1.312 3.044 0 .302.036.58.088.848h3.318z"/>
|
|
520
|
+
</g>
|
|
521
|
+
</svg>`,
|
|
522
|
+
items: [ 'underline', 'strikethrough', 'superscript', 'subscript' ]
|
|
523
|
+
},
|
|
524
|
+
'removeFormat',
|
|
525
|
+
'|',
|
|
526
|
+
'alignment',
|
|
527
|
+
'outdent',
|
|
528
|
+
'indent',
|
|
529
|
+
'|',
|
|
530
|
+
'bulletedList', 'numberedList',
|
|
531
|
+
'|',
|
|
532
|
+
'insertImage','mediaEmbed','strapiMediaLib','link','blockquote','insertTable','specialCharacters','htmlEmbed','codeBlock',
|
|
533
|
+
'|', 'horizontalLine', 'pageBreak', '|',
|
|
534
|
+
'|', 'showBlocks',
|
|
535
|
+
'|', 'undo', 'redo', '|',
|
|
536
|
+
],
|
|
537
|
+
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
export const toolbarBalloonEditorConfig = {
|
|
541
|
+
plugins:[...basePlugins, w.BalloonToolbar],
|
|
542
|
+
...base,
|
|
543
|
+
toolbar: [
|
|
544
|
+
{
|
|
545
|
+
label:' ',
|
|
546
|
+
tooltip: null,
|
|
547
|
+
icon:'paragraph',
|
|
548
|
+
items: [ 'heading','style']
|
|
549
|
+
},
|
|
550
|
+
'|',
|
|
551
|
+
'alignment',
|
|
552
|
+
'outdent',
|
|
553
|
+
'indent',
|
|
554
|
+
'|',
|
|
555
|
+
'bulletedList', 'numberedList',
|
|
556
|
+
'|',
|
|
557
|
+
'insertImage','mediaEmbed','strapiMediaLib','link','blockquote','insertTable','specialCharacters','htmlEmbed','codeBlock',
|
|
558
|
+
'|', 'horizontalLine', 'pageBreak', '|','SourceEditing',
|
|
559
|
+
'|', 'showBlocks',
|
|
560
|
+
'|', 'undo', 'redo', '|',
|
|
561
|
+
],
|
|
562
|
+
balloonToolbar: [
|
|
563
|
+
'bold', 'italic','fontSize', 'fontFamily', 'fontColor', 'fontBackgroundColor',
|
|
564
|
+
{
|
|
565
|
+
label:' ',
|
|
566
|
+
tooltip: null,
|
|
567
|
+
icon:`
|
|
568
|
+
<svg width="800px" height="800px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
569
|
+
<rect x="0" fill="none" width="24" height="24"/>
|
|
570
|
+
<g>
|
|
571
|
+
<path d="M14.348 12H21v2h-4.613c.24.515.368 1.094.368 1.748 0 1.317-.474 2.355-1.423 3.114-.947.76-2.266 1.138-3.956 1.138-1.557 0-2.934-.293-4.132-.878v-2.874c.985.44 1.818.75 2.5.928.682.18 1.306.27 1.872.27.68 0 1.2-.13 1.562-.39.363-.26.545-.644.545-1.158 0-.285-.08-.54-.24-.763-.16-.222-.394-.437-.704-.643-.18-.12-.483-.287-.88-.49H3v-2H14.347zm-3.528-2c-.073-.077-.143-.155-.193-.235-.126-.202-.19-.44-.19-.713 0-.44.157-.795.47-1.068.313-.273.762-.41 1.348-.41.492 0 .993.064 1.502.19.51.127 1.153.35 1.93.67l1-2.405c-.753-.327-1.473-.58-2.16-.76-.69-.18-1.414-.27-2.173-.27-1.544 0-2.753.37-3.628 1.108-.874.738-1.312 1.753-1.312 3.044 0 .302.036.58.088.848h3.318z"/>
|
|
572
|
+
</g>
|
|
573
|
+
</svg>`,
|
|
574
|
+
items: [ 'underline', 'strikethrough', 'superscript', 'subscript' ]
|
|
575
|
+
},
|
|
576
|
+
'|',
|
|
577
|
+
'removeFormat',
|
|
578
|
+
]
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
export const blockBalloonEditorConfig = {
|
|
582
|
+
plugins:[
|
|
583
|
+
...basePlugins.filter(({pluginName})=>
|
|
584
|
+
pluginName !== "SourceEditing" &&
|
|
585
|
+
pluginName !== "SpecialCharacters" &&
|
|
586
|
+
pluginName !== "SpecialCharactersArrows" &&
|
|
587
|
+
pluginName !== "SpecialCharactersCurrency" &&
|
|
588
|
+
pluginName !== "SpecialCharactersEssentials" &&
|
|
589
|
+
pluginName !== "SpecialCharactersLatin" &&
|
|
590
|
+
pluginName !== "SpecialCharactersMathematical" &&
|
|
591
|
+
pluginName !== "SpecialCharactersText" &&
|
|
592
|
+
pluginName !== "PageBreak" &&
|
|
593
|
+
pluginName !== "HorizontalLine" &&
|
|
594
|
+
pluginName !== "MediaEmbed" &&
|
|
595
|
+
pluginName !== "HtmlEmbed" &&
|
|
596
|
+
pluginName !== "Code" &&
|
|
597
|
+
pluginName !== "CodeBlock"
|
|
598
|
+
),
|
|
599
|
+
w.BlockToolbar, w.BalloonToolbar
|
|
600
|
+
],
|
|
601
|
+
...base,
|
|
602
|
+
blockToolbar: [
|
|
603
|
+
{
|
|
604
|
+
label:' ',
|
|
605
|
+
tooltip: null,
|
|
606
|
+
icon:'paragraph',
|
|
607
|
+
items: [ 'heading','style']
|
|
608
|
+
},
|
|
609
|
+
'|',
|
|
610
|
+
'bulletedList', 'numberedList',
|
|
611
|
+
'|',
|
|
612
|
+
'alignment',
|
|
613
|
+
'outdent',
|
|
614
|
+
'indent',
|
|
615
|
+
'|',
|
|
616
|
+
'insertImage','strapiMediaLib','link','blockquote','insertTable',
|
|
617
|
+
'|', 'showBlocks',
|
|
618
|
+
'|', 'undo', 'redo', '|',
|
|
619
|
+
],
|
|
620
|
+
balloonToolbar: [
|
|
621
|
+
'bold', 'italic','fontSize', 'fontFamily', 'fontColor', 'fontBackgroundColor',
|
|
622
|
+
{
|
|
623
|
+
label:' ',
|
|
624
|
+
tooltip: null,
|
|
625
|
+
icon:`
|
|
626
|
+
<svg width="800px" height="800px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
627
|
+
<rect x="0" fill="none" width="24" height="24"/>
|
|
628
|
+
<g>
|
|
629
|
+
<path d="M14.348 12H21v2h-4.613c.24.515.368 1.094.368 1.748 0 1.317-.474 2.355-1.423 3.114-.947.76-2.266 1.138-3.956 1.138-1.557 0-2.934-.293-4.132-.878v-2.874c.985.44 1.818.75 2.5.928.682.18 1.306.27 1.872.27.68 0 1.2-.13 1.562-.39.363-.26.545-.644.545-1.158 0-.285-.08-.54-.24-.763-.16-.222-.394-.437-.704-.643-.18-.12-.483-.287-.88-.49H3v-2H14.347zm-3.528-2c-.073-.077-.143-.155-.193-.235-.126-.202-.19-.44-.19-.713 0-.44.157-.795.47-1.068.313-.273.762-.41 1.348-.41.492 0 .993.064 1.502.19.51.127 1.153.35 1.93.67l1-2.405c-.753-.327-1.473-.58-2.16-.76-.69-.18-1.414-.27-2.173-.27-1.544 0-2.753.37-3.628 1.108-.874.738-1.312 1.753-1.312 3.044 0 .302.036.58.088.848h3.318z"/>
|
|
630
|
+
</g>
|
|
631
|
+
</svg>`,
|
|
632
|
+
items: [ 'underline', 'strikethrough', 'superscript', 'subscript' ]
|
|
633
|
+
},
|
|
634
|
+
'|',
|
|
635
|
+
'removeFormat',
|
|
636
|
+
]
|
|
628
637
|
}
|