@_sh/strapi-plugin-ckeditor 1.1.1 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/README.md +572 -9
  2. package/admin/src/components/CKEditor/build/ckeditor.js +6 -6
  3. package/admin/src/components/CKEditor/build/ckeditor.js.map +1 -1
  4. package/admin/src/components/CKEditor/build/translations/af.js +1 -1
  5. package/admin/src/components/CKEditor/build/translations/ar.js +1 -1
  6. package/admin/src/components/CKEditor/build/translations/ast.js +1 -1
  7. package/admin/src/components/CKEditor/build/translations/az.js +1 -1
  8. package/admin/src/components/CKEditor/build/translations/bg.js +1 -1
  9. package/admin/src/components/CKEditor/build/translations/bn.js +1 -0
  10. package/admin/src/components/CKEditor/build/translations/bs.js +1 -1
  11. package/admin/src/components/CKEditor/build/translations/ca.js +1 -1
  12. package/admin/src/components/CKEditor/build/translations/cs.js +1 -1
  13. package/admin/src/components/CKEditor/build/translations/da.js +1 -1
  14. package/admin/src/components/CKEditor/build/translations/de-ch.js +1 -1
  15. package/admin/src/components/CKEditor/build/translations/de.js +1 -1
  16. package/admin/src/components/CKEditor/build/translations/el.js +1 -1
  17. package/admin/src/components/CKEditor/build/translations/en-au.js +1 -1
  18. package/admin/src/components/CKEditor/build/translations/en-gb.js +1 -1
  19. package/admin/src/components/CKEditor/build/translations/eo.js +1 -1
  20. package/admin/src/components/CKEditor/build/translations/es.js +1 -1
  21. package/admin/src/components/CKEditor/build/translations/et.js +1 -1
  22. package/admin/src/components/CKEditor/build/translations/eu.js +1 -1
  23. package/admin/src/components/CKEditor/build/translations/fa.js +1 -1
  24. package/admin/src/components/CKEditor/build/translations/fi.js +1 -1
  25. package/admin/src/components/CKEditor/build/translations/fr.js +1 -1
  26. package/admin/src/components/CKEditor/build/translations/gl.js +1 -1
  27. package/admin/src/components/CKEditor/build/translations/gu.js +1 -1
  28. package/admin/src/components/CKEditor/build/translations/he.js +1 -1
  29. package/admin/src/components/CKEditor/build/translations/hi.js +1 -1
  30. package/admin/src/components/CKEditor/build/translations/hr.js +1 -1
  31. package/admin/src/components/CKEditor/build/translations/hu.js +1 -1
  32. package/admin/src/components/CKEditor/build/translations/id.js +1 -1
  33. package/admin/src/components/CKEditor/build/translations/it.js +1 -1
  34. package/admin/src/components/CKEditor/build/translations/ja.js +1 -1
  35. package/admin/src/components/CKEditor/build/translations/jv.js +1 -1
  36. package/admin/src/components/CKEditor/build/translations/km.js +1 -1
  37. package/admin/src/components/CKEditor/build/translations/kn.js +1 -1
  38. package/admin/src/components/CKEditor/build/translations/ko.js +1 -1
  39. package/admin/src/components/CKEditor/build/translations/ku.js +1 -1
  40. package/admin/src/components/CKEditor/build/translations/lt.js +1 -1
  41. package/admin/src/components/CKEditor/build/translations/lv.js +1 -1
  42. package/admin/src/components/CKEditor/build/translations/ms.js +1 -0
  43. package/admin/src/components/CKEditor/build/translations/nb.js +1 -1
  44. package/admin/src/components/CKEditor/build/translations/ne.js +1 -1
  45. package/admin/src/components/CKEditor/build/translations/nl.js +1 -1
  46. package/admin/src/components/CKEditor/build/translations/no.js +1 -1
  47. package/admin/src/components/CKEditor/build/translations/oc.js +1 -1
  48. package/admin/src/components/CKEditor/build/translations/pl.js +1 -1
  49. package/admin/src/components/CKEditor/build/translations/pt-br.js +1 -1
  50. package/admin/src/components/CKEditor/build/translations/pt.js +1 -1
  51. package/admin/src/components/CKEditor/build/translations/ro.js +1 -1
  52. package/admin/src/components/CKEditor/build/translations/ru.js +1 -1
  53. package/admin/src/components/CKEditor/build/translations/si.js +1 -1
  54. package/admin/src/components/CKEditor/build/translations/sk.js +1 -1
  55. package/admin/src/components/CKEditor/build/translations/sl.js +1 -1
  56. package/admin/src/components/CKEditor/build/translations/sq.js +1 -1
  57. package/admin/src/components/CKEditor/build/translations/sr-latn.js +1 -1
  58. package/admin/src/components/CKEditor/build/translations/sr.js +1 -1
  59. package/admin/src/components/CKEditor/build/translations/sv.js +1 -1
  60. package/admin/src/components/CKEditor/build/translations/th.js +1 -1
  61. package/admin/src/components/CKEditor/build/translations/tk.js +1 -1
  62. package/admin/src/components/CKEditor/build/translations/tr.js +1 -1
  63. package/admin/src/components/CKEditor/build/translations/tt.js +1 -1
  64. package/admin/src/components/CKEditor/build/translations/ug.js +1 -1
  65. package/admin/src/components/CKEditor/build/translations/uk.js +1 -1
  66. package/admin/src/components/CKEditor/build/translations/ur.js +1 -0
  67. package/admin/src/components/CKEditor/build/translations/uz.js +1 -1
  68. package/admin/src/components/CKEditor/build/translations/vi.js +1 -1
  69. package/admin/src/components/CKEditor/build/translations/zh-cn.js +1 -1
  70. package/admin/src/components/CKEditor/build/translations/zh.js +1 -1
  71. package/admin/src/components/CKEditor/index.js +103 -44
  72. package/admin/src/components/CKEditor/theme.js +31 -0
  73. package/admin/src/components/Initializer/index.js +26 -26
  74. package/admin/src/index.js +17 -17
  75. package/admin/src/pages/App/index.js +25 -25
  76. package/admin/src/pages/HomePage/index.js +20 -20
  77. package/admin/src/pluginId.js +6 -6
  78. package/admin/src/utils/axiosInstance.js +40 -40
  79. package/admin/src/utils/getTrad.js +5 -5
  80. package/package.json +50 -50
  81. package/server/controllers/config.js +20 -14
  82. package/server/controllers/index.js +7 -7
  83. package/server/index.js +13 -25
  84. package/server/register.js +5 -5
  85. package/server/routes/index.js +16 -8
  86. package/server/services/config.js +12 -0
  87. package/server/services/index.js +7 -7
  88. package/strapi-admin.js +3 -3
  89. package/strapi-server.js +3 -3
  90. package/server/bootstrap.js +0 -5
  91. package/server/config/index.js +0 -6
  92. package/server/content-types/index.js +0 -3
  93. package/server/destroy.js +0 -5
  94. package/server/middlewares/index.js +0 -3
  95. package/server/policies/index.js +0 -3
package/README.md CHANGED
@@ -24,7 +24,7 @@
24
24
  * **Strapi media library button.**
25
25
  * **Supports strapi theme swithing.**
26
26
  * **Supports responsive images:** plugin adds srcset attribute to images based on their `formats` if responsive enable in strapi settings.
27
- * **Language support:** you can set the preferred language for the UI or the content in the configuration, by default it will use the language defined in the user profile if that language [is supported](https://github.com/nshenderov/strapi-plugin-ckeditor/tree/master/admin/src/components/CKEditor/build/translations).
27
+ * **Language support:** you can set the preferred language for the UI or the content in the configuration, by default it will use the language defined in the user profile if that language [is supported](https://github.com/nshenderov/strapi-plugin-ckeditor/tree/master/admin/src/components/CKEditor/build/translations). i18 also supported.
28
28
 
29
29
  ## <a id="installation"></a>🔧 Installation
30
30
 
@@ -64,13 +64,61 @@ yarn build
64
64
  ```
65
65
 
66
66
  > 💡 `sizes` and `loading` attributes for image can be set in source mode.
67
- > If you use default upload provider and you want prefix img url with api path you need to add `baseURL` in `api.js` file `(config/api.js)`
68
67
 
69
68
 
70
69
  ## <a id="configuration"></a>⚙️ Configuration
71
- CKEditor config should be defined in `config.editor` field.
70
+ CKEditor config should be defined in `config.editor` field in `plugins.js` file.
72
71
 
73
- Learn more about configuration from [official documentation](https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/configuration.html).
72
+ > ⚠️ Regex patterns and callback functions (/.*/ /^(p|h[2-4])$/' | match => {..} etc) are not allowed in plugins.js config
73
+
74
+ >According to [this PR](https://github.com/nshenderov/strapi-plugin-ckeditor/pull/54), you can create ckeditor.js file in your /config directory and define editor's config in there. This way you can specify all regex patterns, functions, and so on. (plugin's config still should be placed in plugins.js)
75
+
76
+ <details>
77
+ <summary>(spoiler) <b>Example of /config/ckeditor.js:</b> </summary>
78
+
79
+ ```js
80
+ globalThis.ckEditorConfig = {
81
+ toolbar: {
82
+ items: [ ]
83
+ },
84
+ mediaEmbed: {
85
+ previewsInData: true,
86
+
87
+ providers: [
88
+ {
89
+ name: 'youtube',
90
+ url: [
91
+ /^(?:m\.)?youtube\.com\/watch\?v=([\w-]+)(?:&t=(\d+))?/,
92
+ /^(?:m\.)?youtube\.com\/v\/([\w-]+)(?:\?t=(\d+))?/,
93
+ /^youtube\.com\/embed\/([\w-]+)(?:\?start=(\d+))?/,
94
+ /^youtu\.be\/([\w-]+)(?:\?t=(\d+))?/
95
+ ],
96
+ html: match => {
97
+ const id = match[1];
98
+
99
+ return (`<iframe
100
+ src="https://www.youtube-nocookie.com/embed/${id}"
101
+ frameborder="0"
102
+ allow="autoplay; encrypted-media"
103
+ allowfullscreen />
104
+ `);
105
+ }
106
+ },
107
+ ]
108
+ }
109
+ }
110
+ ```
111
+
112
+ </details>
113
+
114
+
115
+ **⚠️ `plugins.js` not `plugin.js` ⚠️**
116
+
117
+ **`plugins.js` file should be placed in `config` folder.**
118
+
119
+ **💡`fullscreen mode` and `source mode` are not supported with `balloon` and `block` toolbars.**
120
+
121
+ Learn more about editor's configuration from [official documentation](https://ckeditor.com/docs/ckeditor5/latest/installation/getting-started/configuration.html).
74
122
 
75
123
  <details>
76
124
  <summary>(spoiler) <b>Built in plugins:</b> </summary>
@@ -148,7 +196,10 @@ Underline,
148
196
  WordCount,
149
197
  Markdown,
150
198
  StrapiMediaLib,
151
- FullScreen
199
+ FullScreen,
200
+ BlockToolbar,
201
+ BalloonToolbar,
202
+ Style
152
203
  ]
153
204
 
154
205
  ```
@@ -172,6 +223,9 @@ module.exports = () => {
172
223
 
173
224
  // styles applied to editor container (global scope) //
174
225
  // styles:`
226
+ // .ck.ck-editor__main .ck-focused{
227
+ // max-height: 700px;
228
+ // }
175
229
  // :root{
176
230
  // --ck-color-focus-border:red;
177
231
  // --ck-color-text:red;
@@ -183,7 +237,7 @@ module.exports = () => {
183
237
  // https://ckeditor.com/docs/ckeditor5/latest/features/markdown.html
184
238
  // if you need markdown support and output set: removePlugins: [''],
185
239
  // default is
186
- removePlugins: ['Markdown'],
240
+ // removePlugins: ['Markdown'],
187
241
 
188
242
  // https://ckeditor.com/docs/ckeditor5/latest/features/toolbar/toolbar.html
189
243
  toolbar: {
@@ -328,7 +382,6 @@ module.exports = () => {
328
382
  ]
329
383
  },
330
384
  // https://ckeditor.com/docs/ckeditor5/latest/features/general-html-support.html
331
- // Regular expressions (/.*/ /^(p|h[2-4])$/' etc) for htmlSupport does not allowed in this config
332
385
  htmlSupport: {
333
386
  allow: [
334
387
  {
@@ -346,6 +399,514 @@ module.exports = () => {
346
399
  }
347
400
  }
348
401
  ```
402
+ **Some of configuration:**
403
+
404
+ <h3 align="center">Balloon+Block+Style</h3>
405
+
406
+ <p align="center">
407
+ <img src="https://raw.githubusercontent.com/nshenderov/strapi-plugin-ckeditor/master/assets/balloonblockstyles.gif" alt="CKEditor5-Strapi" width="800" />
408
+ </p>
409
+
410
+ <details>
411
+ <summary><b>Balloon+Block+Style config:</b> </summary>
412
+
413
+ ```js
414
+ module.exports = () => {
415
+ return {
416
+ ckeditor: {
417
+ enabled: true,
418
+ config:{
419
+ plugin:{
420
+ styles:`
421
+ .ck-content{
422
+ border-radius:4px !important;
423
+ }
424
+ .ck-sticky-panel{
425
+ display:none !important;
426
+ }
427
+
428
+ .ck.ck-content h3.category {
429
+ font-family: 'Bebas Neue';
430
+ font-size: 20px;
431
+ font-weight: bold;
432
+ color: #d1d1d1;
433
+ letter-spacing: 10px;
434
+ margin: 0;
435
+ padding: 0;
436
+ }
437
+
438
+ .ck.ck-content h2.document-title {
439
+ font-family: 'Bebas Neue';
440
+ font-size: 50px;
441
+ font-weight: bold;
442
+ margin: 0;
443
+ padding: 0;
444
+ border: 0;
445
+ }
446
+
447
+ .ck.ck-content h3.document-subtitle {
448
+ font-size: 20px;
449
+ color: #e91e63;
450
+ margin: 0 0 1em;
451
+ font-weight: normal;
452
+ padding: 0;
453
+ }
454
+
455
+ .ck.ck-content p.info-box {
456
+ --background-size: 30px;
457
+ --background-color: #e91e63;
458
+ padding: 1.2em 2em;
459
+ border: 1px solid var(--background-color);
460
+ background: linear-gradient(135deg, var(--background-color) 0%, var(--background-color) var(--background-size), transparent var(--background-size)), linear-gradient(135deg, transparent calc(100% - var(--background-size)), var(--background-color) calc(100% - var(--background-size)), var(--background-color));
461
+ border-radius: 10px;
462
+ margin: 1.5em 2em;
463
+ box-shadow: 5px 5px 0 #ffe6ef;
464
+ }
465
+
466
+ .ck.ck-content blockquote.side-quote {
467
+ font-family: 'Bebas Neue';
468
+ font-style: normal;
469
+ float: right;
470
+ width: 35%;
471
+ position: relative;
472
+ border: 0;
473
+ overflow: visible;
474
+ z-index: 1;
475
+ margin-left: 1em;
476
+ }
477
+
478
+ .ck.ck-content blockquote.side-quote::before {
479
+ content: "“";
480
+ position: absolute;
481
+ top: -37px;
482
+ left: -10px;
483
+ display: block;
484
+ font-size: 200px;
485
+ color: #e7e7e7;
486
+ z-index: -1;
487
+ line-height: 1;
488
+ }
489
+
490
+ .ck.ck-content blockquote.side-quote p {
491
+ font-size: 2em;
492
+ line-height: 1;
493
+ }
494
+
495
+ .ck.ck-content blockquote.side-quote p:last-child:not(:first-child) {
496
+ font-size: 1.3em;
497
+ text-align: right;
498
+ color: #555;
499
+ }
500
+
501
+ .ck.ck-content span.marker {
502
+ background: yellow;
503
+ }
504
+
505
+ .ck.ck-content span.spoiler {
506
+ background: #000;
507
+ color: #000;
508
+ }
509
+
510
+ .ck.ck-content span.spoiler:hover {
511
+ background: #000;
512
+ color: #fff;
513
+ }
514
+
515
+ .ck.ck-content pre.fancy-code {
516
+ border: 0;
517
+ margin-left: 2em;
518
+ margin-right: 2em;
519
+ border-radius: 10px;
520
+ }
521
+
522
+ .ck.ck-content pre.fancy-code::before {
523
+ content: "";
524
+ display: block;
525
+ height: 13px;
526
+ background: url(data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1NCAxMyI+CiAgPGNpcmNsZSBjeD0iNi41IiBjeT0iNi41IiByPSI2LjUiIGZpbGw9IiNGMzZCNUMiLz4KICA8Y2lyY2xlIGN4PSIyNi41IiBjeT0iNi41IiByPSI2LjUiIGZpbGw9IiNGOUJFNEQiLz4KICA8Y2lyY2xlIGN4PSI0Ny41IiBjeT0iNi41IiByPSI2LjUiIGZpbGw9IiM1NkM0NTMiLz4KPC9zdmc+Cg==);
527
+ margin-bottom: 8px;
528
+ background-repeat: no-repeat;
529
+ }
530
+
531
+ .ck.ck-content pre.fancy-code-dark {
532
+ background: #272822;
533
+ color: #fff;
534
+ box-shadow: 5px 5px 0 #0000001f;
535
+ }
536
+
537
+ .ck.ck-content pre.fancy-code-bright {
538
+ background: #dddfe0;
539
+ color: #000;
540
+ box-shadow: 5px 5px 0 #b3b3b3;
541
+ }
542
+
543
+ `
544
+ },
545
+ editor:{
546
+ toolbar:[],
547
+ // https://ckeditor.com/docs/ckeditor5/latest/features/toolbar/blocktoolbar.html
548
+ blockToolbar: {
549
+ items: [
550
+ 'heading','style',
551
+ '|',
552
+ 'outdent',
553
+ 'indent',
554
+ 'horizontalLine',
555
+ '|',
556
+ 'StrapiMediaLib',
557
+ '-',
558
+ 'bulletedList', 'numberedList',
559
+ '|',
560
+ 'insertTable', 'blockQuote',
561
+ '|',
562
+ 'code'
563
+ ],
564
+ },
565
+ balloonToolbar: [
566
+ 'bold',
567
+ 'italic',
568
+ 'fontColor',
569
+ 'FontBackgroundColor',
570
+ 'fontFamily',
571
+ 'fontSize',
572
+ 'alignment',
573
+ '|',
574
+ 'removeFormat',
575
+ 'undo',
576
+ 'redo'
577
+ ],
578
+ // https://ckeditor.com/docs/ckeditor5/latest/features/style.html
579
+ style: {
580
+ definitions: [
581
+ {
582
+ name: 'Article category',
583
+ element: 'h3',
584
+ classes: [ 'category' ]
585
+ },
586
+ {
587
+ name: 'Title',
588
+ element: 'h2',
589
+ classes: [ 'document-title' ]
590
+ },
591
+ {
592
+ name: 'Subtitle',
593
+ element: 'h3',
594
+ classes: [ 'document-subtitle' ]
595
+ },
596
+ {
597
+ name: 'Info box',
598
+ element: 'p',
599
+ classes: [ 'info-box' ]
600
+ },
601
+ {
602
+ name: 'Side quote',
603
+ element: 'blockquote',
604
+ classes: [ 'side-quote' ]
605
+ },
606
+ {
607
+ name: 'Marker',
608
+ element: 'span',
609
+ classes: [ 'marker' ]
610
+ },
611
+ {
612
+ name: 'Spoiler',
613
+ element: 'span',
614
+ classes: [ 'spoiler' ]
615
+ },
616
+ {
617
+ name: 'Code (dark)',
618
+ element: 'pre',
619
+ classes: [ 'fancy-code', 'fancy-code-dark' ]
620
+ },
621
+ {
622
+ name: 'Code (bright)',
623
+ element: 'pre',
624
+ classes: [ 'fancy-code', 'fancy-code-bright' ]
625
+ }
626
+ ]
627
+ },
628
+ fontSize: {
629
+ options: [
630
+ 9,
631
+ 11,
632
+ 13,
633
+ 'default',
634
+ 17,
635
+ 19,
636
+ 21,
637
+ 27,
638
+ 35,
639
+ ],
640
+ supportAllValues: false
641
+ },
642
+ fontFamily: {
643
+ options: [
644
+ 'default',
645
+ 'Arial, Helvetica Neue, Helvetica, Source Sans Pro, sans-serif',
646
+ 'Courier New, Courier, monospace',
647
+ 'Georgia, serif',
648
+ 'Lucida Sans Unicode, Lucida Grande, sans-serif',
649
+ 'Tahoma, Geneva, sans-serif',
650
+ 'Times New Roman, Times, serif',
651
+ 'Trebuchet MS, Helvetica, sans-serif',
652
+ 'Verdana, Geneva, sans-serif',
653
+ 'Roboto, Roboto Black, Roboto Medium, Roboto Light, sans-serif',
654
+ ],
655
+ supportAllValues: true
656
+ },
657
+ fontColor: {
658
+ columns: 5,
659
+ documentColors: 10,
660
+ },
661
+ fontBackgroundColor: {
662
+ columns: 5,
663
+ documentColors: 10,
664
+ },
665
+ image: {
666
+ resizeUnit: "%",
667
+ resizeOptions: [ {
668
+ name: 'resizeImage:original',
669
+ value: null,
670
+ icon: 'original'
671
+ },
672
+ {
673
+ name: 'resizeImage:25',
674
+ value: '25',
675
+ icon: 'small'
676
+ },
677
+ {
678
+ name: 'resizeImage:50',
679
+ value: '50',
680
+ icon: 'medium'
681
+ },
682
+ {
683
+ name: 'resizeImage:75',
684
+ value: '75',
685
+ icon: 'large'
686
+ } ],
687
+ toolbar: [
688
+ 'toggleImageCaption',
689
+ 'imageTextAlternative',
690
+ 'imageStyle:inline',
691
+ 'imageStyle:block',
692
+ 'imageStyle:side',
693
+ 'linkImage',
694
+ 'resizeImage:25', 'resizeImage:50', 'resizeImage:75', 'resizeImage:original'
695
+ ]
696
+ },
697
+ table: {
698
+ contentToolbar: [
699
+ 'tableColumn',
700
+ 'tableRow',
701
+ 'mergeTableCells',
702
+ 'tableCellProperties',
703
+ 'tableProperties',
704
+ 'toggleTableCaption'
705
+ ]
706
+ },
707
+ heading: {
708
+ options: [
709
+ { model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },
710
+ { model: 'heading1', view: 'h1', title: 'Heading 1', class: 'ck-heading_heading1' },
711
+ { model: 'heading2', view: 'h2', title: 'Heading 2', class: 'ck-heading_heading2' },
712
+ { model: 'heading3', view: 'h3', title: 'Heading 3', class: 'ck-heading_heading3' },
713
+ { model: 'heading4', view: 'h4', title: 'Heading 4', class: 'ck-heading_heading4' },
714
+ ]
715
+ },
716
+ htmlSupport: {
717
+ allow: [
718
+ {
719
+ name: 'img',
720
+ attributes: {
721
+ sizes:true,
722
+ loading:true,
723
+ }
724
+ },
725
+ ]
726
+ },
727
+ }
728
+ }
729
+ }
730
+ }
731
+ }
732
+
733
+ ```
734
+ </details>
735
+
736
+ <h3 align="center">Classic+Balloon</h3>
737
+
738
+ <p align="center">
739
+ <img src="https://raw.githubusercontent.com/nshenderov/strapi-plugin-ckeditor/master/assets/230222.jpg" alt="CKEditor5-Strapi" width="800" />
740
+ </p>
741
+
742
+ <details>
743
+ <summary><b>Classic+Balloon config:</b> </summary>
744
+
745
+ ```js
746
+ module.exports = () => {
747
+ return {
748
+ ckeditor: {
749
+ enabled: true,
750
+ config:{
751
+ editor:{
752
+ toolbar: {
753
+ items: [
754
+ 'paragraph',
755
+ 'heading1',
756
+ 'heading2',
757
+ '|',
758
+ 'bulletedList',
759
+ 'todoList',
760
+ 'numberedList',
761
+ '|',
762
+ 'outdent',
763
+ 'indent',
764
+ 'horizontalLine',
765
+ '|',
766
+ 'StrapiMediaLib',
767
+ 'insertTable',
768
+ 'blockQuote',
769
+ 'mediaEmbed',
770
+ 'link',
771
+ 'highlight',
772
+ '|',
773
+ 'htmlEmbed',
774
+ 'sourceEditing',
775
+ 'code',
776
+ 'codeBlock',
777
+ '|',
778
+ 'subscript',
779
+ 'superscript',
780
+ 'strikethrough',
781
+ 'specialCharacters',
782
+ '|',
783
+ 'heading',
784
+ "fullScreen",
785
+ 'undo',
786
+ 'redo'
787
+ ]
788
+ },
789
+ balloonToolbar: [
790
+ 'bold',
791
+ 'italic',
792
+ 'fontColor',
793
+ 'FontBackgroundColor',
794
+ 'fontFamily',
795
+ 'fontSize',
796
+ 'alignment',
797
+ '|',
798
+ 'removeFormat',
799
+ 'undo',
800
+ 'redo'
801
+ ],
802
+ fontSize: {
803
+ options: [
804
+ 9,
805
+ 11,
806
+ 13,
807
+ 'default',
808
+ 17,
809
+ 19,
810
+ 21,
811
+ 27,
812
+ 35,
813
+ ],
814
+ supportAllValues: false
815
+ },
816
+ fontFamily: {
817
+ options: [
818
+ 'default',
819
+ 'Arial, Helvetica Neue, Helvetica, Source Sans Pro, sans-serif',
820
+ 'Courier New, Courier, monospace',
821
+ 'Georgia, serif',
822
+ 'Lucida Sans Unicode, Lucida Grande, sans-serif',
823
+ 'Tahoma, Geneva, sans-serif',
824
+ 'Times New Roman, Times, serif',
825
+ 'Trebuchet MS, Helvetica, sans-serif',
826
+ 'Verdana, Geneva, sans-serif',
827
+ 'Roboto, Roboto Black, Roboto Medium, Roboto Light, sans-serif',
828
+ ],
829
+ supportAllValues: true
830
+ },
831
+ fontColor: {
832
+ columns: 5,
833
+ documentColors: 10,
834
+ },
835
+ fontBackgroundColor: {
836
+ columns: 5,
837
+ documentColors: 10,
838
+ },
839
+ image: {
840
+ resizeUnit: "%",
841
+ resizeOptions: [ {
842
+ name: 'resizeImage:original',
843
+ value: null,
844
+ icon: 'original'
845
+ },
846
+ {
847
+ name: 'resizeImage:25',
848
+ value: '25',
849
+ icon: 'small'
850
+ },
851
+ {
852
+ name: 'resizeImage:50',
853
+ value: '50',
854
+ icon: 'medium'
855
+ },
856
+ {
857
+ name: 'resizeImage:75',
858
+ value: '75',
859
+ icon: 'large'
860
+ } ],
861
+ toolbar: [
862
+ 'toggleImageCaption',
863
+ 'imageTextAlternative',
864
+ 'imageStyle:inline',
865
+ 'imageStyle:block',
866
+ 'imageStyle:side',
867
+ 'linkImage',
868
+ 'resizeImage:25', 'resizeImage:50', 'resizeImage:75', 'resizeImage:original'
869
+ ]
870
+ },
871
+ table: {
872
+ contentToolbar: [
873
+ 'tableColumn',
874
+ 'tableRow',
875
+ 'mergeTableCells',
876
+ 'tableCellProperties',
877
+ 'tableProperties',
878
+ 'toggleTableCaption'
879
+ ]
880
+ },
881
+ heading: {
882
+ options: [
883
+ { model: 'paragraph', title: 'Paragraph', class: 'ck-heading_paragraph' },
884
+ { model: 'heading1', view: 'h1', title: 'Heading 1', class: 'ck-heading_heading1' },
885
+ { model: 'heading2', view: 'h2', title: 'Heading 2', class: 'ck-heading_heading2' },
886
+ { model: 'heading3', view: 'h3', title: 'Heading 3', class: 'ck-heading_heading3' },
887
+ { model: 'heading4', view: 'h4', title: 'Heading 4', class: 'ck-heading_heading4' },
888
+ ]
889
+ },
890
+ htmlSupport: {
891
+ allow: [
892
+ {
893
+ name: 'img',
894
+ attributes: {
895
+ sizes:true,
896
+ loading:true,
897
+ }
898
+ },
899
+ ]
900
+ },
901
+ }
902
+ }
903
+ }
904
+ }
905
+ }
906
+
907
+ ```
908
+ </details>
909
+
349
910
  ## <a id="themecustomization"></a>💅 Theme customization
350
911
  If you want to customize editor styles you should define styles in `config.plugin.styles` field.
351
912
 
@@ -421,9 +982,11 @@ module.exports = styles;
421
982
  ```
422
983
 
423
984
  ## <a id="requirements"></a>⚠️ Requirements
424
- Strapi **v4**
985
+ Strapi **v4.1.8+**
986
+
987
+ Node **>=14.19.1 <=18.x.x**
425
988
 
426
- Tested on **v4.18 - 4.2.3**
989
+ Tested on **v4.1.8 - 4.5.6**
427
990
 
428
991
  ## <a id="thanks"></a>👍 This build includes some useful plugins based on these repos so thanks to them:
429
992
  https://github.com/Roslovets-Inc/strapi-plugin-ckeditor5