@_sh/strapi-plugin-ckeditor 1.0.7 → 1.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.
Files changed (61) hide show
  1. package/README.md +172 -39
  2. package/admin/src/components/CKEditor/build/ckeditor.js +2 -2
  3. package/admin/src/components/CKEditor/build/ckeditor.js.map +1 -1
  4. package/admin/src/components/CKEditor/build/translations/ar.js +1 -1
  5. package/admin/src/components/CKEditor/build/translations/az.js +1 -1
  6. package/admin/src/components/CKEditor/build/translations/bs.js +1 -1
  7. package/admin/src/components/CKEditor/build/translations/ca.js +1 -1
  8. package/admin/src/components/CKEditor/build/translations/cs.js +1 -1
  9. package/admin/src/components/CKEditor/build/translations/da.js +1 -1
  10. package/admin/src/components/CKEditor/build/translations/de-ch.js +1 -1
  11. package/admin/src/components/CKEditor/build/translations/de.js +1 -1
  12. package/admin/src/components/CKEditor/build/translations/el.js +1 -1
  13. package/admin/src/components/CKEditor/build/translations/en-au.js +1 -1
  14. package/admin/src/components/CKEditor/build/translations/en-gb.js +1 -1
  15. package/admin/src/components/CKEditor/build/translations/es.js +1 -1
  16. package/admin/src/components/CKEditor/build/translations/et.js +1 -1
  17. package/admin/src/components/CKEditor/build/translations/fa.js +1 -1
  18. package/admin/src/components/CKEditor/build/translations/fi.js +1 -1
  19. package/admin/src/components/CKEditor/build/translations/fr.js +1 -1
  20. package/admin/src/components/CKEditor/build/translations/gl.js +1 -1
  21. package/admin/src/components/CKEditor/build/translations/he.js +1 -1
  22. package/admin/src/components/CKEditor/build/translations/hi.js +1 -1
  23. package/admin/src/components/CKEditor/build/translations/hr.js +1 -1
  24. package/admin/src/components/CKEditor/build/translations/hu.js +1 -1
  25. package/admin/src/components/CKEditor/build/translations/id.js +1 -1
  26. package/admin/src/components/CKEditor/build/translations/it.js +1 -1
  27. package/admin/src/components/CKEditor/build/translations/ja.js +1 -1
  28. package/admin/src/components/CKEditor/build/translations/jv.js +1 -1
  29. package/admin/src/components/CKEditor/build/translations/ko.js +1 -1
  30. package/admin/src/components/CKEditor/build/translations/ku.js +1 -1
  31. package/admin/src/components/CKEditor/build/translations/lt.js +1 -1
  32. package/admin/src/components/CKEditor/build/translations/lv.js +1 -1
  33. package/admin/src/components/CKEditor/build/translations/nb.js +1 -1
  34. package/admin/src/components/CKEditor/build/translations/ne.js +1 -1
  35. package/admin/src/components/CKEditor/build/translations/nl.js +1 -1
  36. package/admin/src/components/CKEditor/build/translations/no.js +1 -1
  37. package/admin/src/components/CKEditor/build/translations/pl.js +1 -1
  38. package/admin/src/components/CKEditor/build/translations/pt-br.js +1 -1
  39. package/admin/src/components/CKEditor/build/translations/pt.js +1 -1
  40. package/admin/src/components/CKEditor/build/translations/ro.js +1 -1
  41. package/admin/src/components/CKEditor/build/translations/ru.js +1 -1
  42. package/admin/src/components/CKEditor/build/translations/sk.js +1 -1
  43. package/admin/src/components/CKEditor/build/translations/sl.js +1 -1
  44. package/admin/src/components/CKEditor/build/translations/sq.js +1 -1
  45. package/admin/src/components/CKEditor/build/translations/sr-latn.js +1 -1
  46. package/admin/src/components/CKEditor/build/translations/sr.js +1 -1
  47. package/admin/src/components/CKEditor/build/translations/sv.js +1 -1
  48. package/admin/src/components/CKEditor/build/translations/th.js +1 -1
  49. package/admin/src/components/CKEditor/build/translations/tk.js +1 -1
  50. package/admin/src/components/CKEditor/build/translations/tr.js +1 -1
  51. package/admin/src/components/CKEditor/build/translations/ug.js +1 -1
  52. package/admin/src/components/CKEditor/build/translations/uk.js +1 -1
  53. package/admin/src/components/CKEditor/build/translations/uz.js +1 -1
  54. package/admin/src/components/CKEditor/build/translations/vi.js +1 -1
  55. package/admin/src/components/CKEditor/build/translations/zh-cn.js +1 -1
  56. package/admin/src/components/CKEditor/build/translations/zh.js +1 -1
  57. package/admin/src/components/CKEditor/index.js +140 -117
  58. package/admin/src/components/CKEditor/styles.js +12 -19
  59. package/admin/src/components/CKEditor/{theme-colors.css → theme.js} +65 -116
  60. package/package.json +7 -1
  61. package/assets/ckeditor5.png +0 -0
@@ -1,121 +1,63 @@
1
- :root {
2
- /* Overrides the border radius setting in the theme. */
3
- --ck-border-radius: 4px;
4
-
5
- /* Helper variables to avoid duplication in the colors. */
6
- --ck-custom-background: hsl(270, 56%, 37%);
7
- --ck-custom-foreground: hsl(255, 3%, 18%);
8
- --ck-custom-border: hsl(300, 1%, 22%);
9
- --ck-custom-white: hsl(0, 0%, 100%);
10
-
11
- /* -- Overrides generic colors. ------------------------------------------------------------- */
12
-
13
- --ck-color-base-foreground: var(--ck-custom-background);
14
- --ck-color-focus-border: hsl(208, 90%, 62%);
15
- --ck-color-text: hsl(0, 0%, 98%);
16
- --ck-color-shadow-drop: hsla(0, 0%, 0%, 0.2);
17
- --ck-color-shadow-inner: hsla(0, 0%, 0%, 0.1);
18
-
19
- /* -- Overrides the default .ck-button class colors. ---------------------------------------- */
20
-
21
- --ck-color-button-default-background: var(--ck-custom-background);
22
- --ck-color-button-default-hover-background: hsl(270, 1%, 22%);
23
- --ck-color-button-default-active-background: hsl(270, 2%, 20%);
24
- --ck-color-button-default-active-shadow: hsl(270, 2%, 23%);
25
- --ck-color-button-default-disabled-background: var(--ck-custom-background);
26
-
27
- --ck-color-button-on-background: var(--ck-custom-foreground);
28
- --ck-color-button-on-hover-background: hsl(255, 4%, 16%);
29
- --ck-color-button-on-active-background: hsl(255, 4%, 14%);
30
- --ck-color-button-on-active-shadow: hsl(240, 3%, 19%);
31
- --ck-color-button-on-disabled-background: var(--ck-custom-foreground);
32
-
33
- --ck-color-button-action-background: hsl(168, 76%, 42%);
34
- --ck-color-button-action-hover-background: hsl(168, 76%, 38%);
35
- --ck-color-button-action-active-background: hsl(168, 76%, 36%);
36
- --ck-color-button-action-active-shadow: hsl(168, 75%, 34%);
37
- --ck-color-button-action-disabled-background: hsl(168, 76%, 42%);
38
- --ck-color-button-action-text: var(--ck-custom-white);
39
-
40
- --ck-color-button-save: hsl(120, 100%, 46%);
41
- --ck-color-button-cancel: hsl(15, 100%, 56%);
42
-
43
- /* -- Overrides the default .ck-dropdown class colors. -------------------------------------- */
44
-
45
- --ck-color-dropdown-panel-background: var(--ck-custom-background);
46
- --ck-color-dropdown-panel-border: var(--ck-custom-foreground);
47
-
48
- /* -- Overrides the default .ck-splitbutton class colors. ----------------------------------- */
49
-
50
- --ck-color-split-button-hover-background: var(--ck-color-button-default-hover-background);
51
- --ck-color-split-button-hover-border: var(--ck-custom-foreground);
52
-
53
- /* -- Overrides the default .ck-input class colors. ----------------------------------------- */
54
-
55
- --ck-color-input-background: var(--ck-custom-background);
56
- --ck-color-input-border: hsl(257, 3%, 43%);
57
- --ck-color-input-text: hsl(0, 0%, 98%);
58
- --ck-color-input-disabled-background: hsl(255, 4%, 21%);
59
- --ck-color-input-disabled-border: hsl(250, 3%, 38%);
60
- --ck-color-input-disabled-text: hsl(0, 0%, 78%);
61
-
62
- /* -- Overrides the default .ck-labeled-field-view class colors. ---------------------------- */
63
-
64
- --ck-color-labeled-field-label-background: var(--ck-custom-background);
65
-
66
- /* -- Overrides the default .ck-list class colors. ------------------------------------------ */
67
-
68
- --ck-color-list-background: var(--ck-custom-background);
69
- --ck-color-list-button-hover-background: var(--ck-color-base-foreground);
70
- --ck-color-list-button-on-background: var(--ck-color-base-active);
71
- --ck-color-list-button-on-background-focus: var(--ck-color-base-active-focus);
72
- --ck-color-list-button-on-text: var(--ck-color-base-background);
73
-
74
- /* -- Overrides the default .ck-balloon-panel class colors. --------------------------------- */
75
-
76
- --ck-color-panel-background: var(--ck-custom-background);
77
- --ck-color-panel-border: var(--ck-custom-border);
78
-
79
- /* -- Overrides the default .ck-toolbar class colors. --------------------------------------- */
80
-
81
- --ck-color-toolbar-background: var(--ck-custom-background);
82
- --ck-color-toolbar-border: var(--ck-custom-border);
83
-
84
- /* -- Overrides the default .ck-tooltip class colors. --------------------------------------- */
85
-
86
- --ck-color-tooltip-background: hsl(252, 7%, 14%);
87
- --ck-color-tooltip-text: hsl(0, 0%, 93%);
88
-
89
- /* -- Overrides the default colors used by the ckeditor5-image package. --------------------- */
90
-
91
- --ck-color-image-caption-background: hsl(0, 0%, 97%);
92
- --ck-color-image-caption-text: hsl(0, 0%, 20%);
93
-
94
- /* -- Overrides the default colors used by the ckeditor5-widget package. -------------------- */
95
-
96
- --ck-color-widget-blurred-border: hsl(0, 0%, 87%);
97
- --ck-color-widget-hover-border: hsl(43, 100%, 68%);
98
- --ck-color-widget-editable-focus-background: var(--ck-custom-white);
99
-
100
- /* -- Overrides the default colors used by the ckeditor5-link package. ---------------------- */
101
-
102
- --ck-color-link-default: hsl(190, 100%, 75%);
1
+ const theme = `
2
+ .ck.ck-editor__main .ck-blurred{
3
+ max-height: 200px;
4
+ }
5
+ .ck.ck-editor__main .ck-focused{
6
+ max-height: 900px;
7
+ }
8
+ .ck.ck-sticky-panel .ck-sticky-panel__content_sticky{ top:64px }
9
+ .ck.ck-reset.ck-dropdown__panel.ck-dropdown__panel_sw.ck-dropdown__panel-visible{
10
+ border-radius:4px;
11
+ }
12
+ .ck.ck-editor__main .ck-focused, .ck-blurred{
13
+ overflow-y: auto;
14
+ overflow-x: hidden;
15
+ transition: max-height 0.5s ease-in-out;
16
+ ::-webkit-scrollbar {
17
+ width: 7px;
18
+
19
+ }
20
+
21
+ ::-webkit-scrollbar-track {
22
+ background: var(--ck-scroll-track-background);
23
+ border: none;
24
+ }
25
+
26
+ ::-webkit-scrollbar-thumb {
27
+ transition:background 2s;
28
+ background: var(--ck-scroll-thumb-background);
29
+ border: 1px solid var(--ck-scroll-thumb-border-color);
30
+ }
31
+ ::-webkit-scrollbar-thumb:hover {
32
+ transition:background 2s;
33
+ background: var(--ck-scroll-thumb-hover-background);
34
+ }
35
+ ::-webkit-scrollbar-thumb:active {
36
+ background: var(--ck-scroll-thumb-active-background);
37
+ }
103
38
  }
104
39
 
105
40
  html[data-theme='light'] {
41
+
42
+ --ck-scroll-track-background:rgb(242,242,242);
43
+ --ck-scroll-thumb-background:rgb(236,236,236);
44
+ --ck-scroll-thumb-border-color:#cdcdf8;
45
+ --ck-scroll-thumb-hover-background:#F0F0FF;
46
+ --ck-scroll-thumb-active-background:#D9D8FF;
47
+
106
48
  --ck-color-editor-base-text:#1A1A1A;
107
49
  /* Overrides the border radius setting in the theme. */
108
50
  --ck-border-radius: 4px;
109
51
 
110
52
  /* Helper variables to avoid duplication in the colors. */
111
- --ck-color-base-border: #EAEAEF;
53
+ --ck-color-base-border: #DCDCE4;
112
54
  --ck-color-base-background:#ffffff;
113
55
  --ck-custom-background: #ffffff;
114
56
  --ck-custom-foreground: #dedede;
115
- --ck-custom-border: #EAEAEF;
57
+ --ck-custom-border: #DCDCE4;
116
58
  --ck-custom-white: hsl(0, 0%, 100%);
117
59
 
118
- --ck-color-focus-outer-shadow:#F0F0FF;
60
+ --ck-color-focus-outer-shadow:#F6F6F9;
119
61
 
120
62
  --ck-color-base-focus: #bbbaf1;
121
63
  --ck-color-base-active: #F0F0FF;
@@ -123,7 +65,7 @@ html[data-theme='light'] {
123
65
  /* -- Overrides generic colors. ------------------------------------------------------------- */
124
66
 
125
67
  --ck-color-base-foreground: var(--ck-custom-background);
126
- --ck-color-focus-border: #4945FF;
68
+ --ck-color-focus-border: #bdc8fc;
127
69
  --ck-color-text: #32324D;
128
70
  /* --ck-color-text: hsl(240, 18%, 33%); */
129
71
  --ck-color-shadow-drop: hsla(250, 31%, 80%, 0.1);
@@ -133,13 +75,13 @@ html[data-theme='light'] {
133
75
 
134
76
  --ck-color-button-default-background: var(--ck-custom-background);
135
77
  --ck-color-button-default-hover-background: #F0F0FF;
136
- --ck-color-button-default-active-background: #dedefb;
78
+ --ck-color-button-default-active-background: #F6F6F9;
137
79
  --ck-color-button-default-active-shadow: #dedefb;
138
80
  --ck-color-button-default-disabled-background: var(--ck-custom-background);
139
81
 
140
- --ck-color-button-on-background: #F0F0FF;
141
- --ck-color-button-on-hover-background: #dbdbff;
142
- --ck-color-button-on-active-background: #cdcdf8;
82
+ --ck-color-button-on-background: #F6F6F9;
83
+ --ck-color-button-on-hover-background: #F0F0FF;
84
+ --ck-color-button-on-active-background: #F6F6F9;
143
85
  --ck-color-button-on-active-shadow: #cdcdf8;
144
86
  --ck-color-button-on-disabled-background: var(--ck-custom-foreground);
145
87
 
@@ -217,23 +159,28 @@ html[data-theme='light'] {
217
159
  }
218
160
 
219
161
  html[data-theme='dark'] {
162
+
163
+ --ck-scroll-track-background:#3d3d57;
164
+ --ck-scroll-thumb-background:#181826;
165
+ --ck-scroll-thumb-border-color:rgb(70,70,70);
166
+ --ck-scroll-thumb-hover-background:#202033;
167
+ --ck-scroll-thumb-active-background:#2b2b45;
168
+
220
169
  --ck-color-editor-base-text:rgb(236, 236, 236);
221
170
  /* Overrides the border radius setting in the theme. */
222
171
  --ck-border-radius: 4px;
223
172
 
224
- /* Overrides the default font size in the theme. */
225
- /* --ck-font-size-base: 14px; */
226
173
  /* Helper variables to avoid duplication in the colors. */
227
174
  --ck-color-base-border: #4A4A6A;
228
175
  /* --ck-color-base-background:#212134; */
229
176
  /* --ck-color-base-background:#292943; */
230
177
  --ck-color-base-background:#27273e;
231
- --ck-custom-background: #212134;
178
+ --ck-custom-background: #181826;
232
179
  --ck-custom-foreground: #26263b;
233
180
  --ck-custom-border: #4A4A6A;
234
181
  --ck-custom-white: hsl(0, 0%, 100%);
235
182
 
236
- --ck-color-focus-outer-shadow:#bbbaf1;
183
+ --ck-color-focus-outer-shadow:#212134;
237
184
 
238
185
  --ck-color-base-focus: #bbbaf1;
239
186
  --ck-color-base-active: #8280fc;
@@ -249,7 +196,7 @@ html[data-theme='dark'] {
249
196
  /* -- Overrides the default .ck-button class colors. ---------------------------------------- */
250
197
 
251
198
  --ck-color-button-default-background: var(--ck-custom-background);
252
- --ck-color-button-default-hover-background: #7B79FF;
199
+ --ck-color-button-default-hover-background: #262630;
253
200
  --ck-color-button-default-active-background: #7B79FF;
254
201
  --ck-color-button-default-active-shadow: #7B79FF;
255
202
  --ck-color-button-default-disabled-background: var(--ck-custom-background);
@@ -330,4 +277,6 @@ html[data-theme='dark'] {
330
277
  /* -- Overrides the default colors used by the ckeditor5-link package. ---------------------- */
331
278
 
332
279
  --ck-color-link-default: hsl(216, 100%, 75%);
333
- }
280
+ }
281
+ `;
282
+ export default theme
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@_sh/strapi-plugin-ckeditor",
3
- "version": "1.0.7",
3
+ "version": "1.1.0",
4
4
  "description": "Replaces the default Strapi WYSIWYG editor with a customized buil of CKEditor 5 packed with useful plugins.",
5
5
  "private": false,
6
6
  "keywords": [
@@ -19,6 +19,12 @@
19
19
  "description": "Replaces the default Strapi WYSIWYG editor with a customized buil of CKEditor 5 packed with useful plugins.",
20
20
  "kind": "plugin"
21
21
  },
22
+ "files": [
23
+ "admin",
24
+ "server",
25
+ "strapi-admin.js",
26
+ "strapi-server.js"
27
+ ],
22
28
  "dependencies": {
23
29
  "@ckeditor/ckeditor5-react": "5.0.0"
24
30
  },
Binary file