@_sh/strapi-plugin-ckeditor 3.0.2 → 4.0.1

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 (180) hide show
  1. package/README.md +19 -31
  2. package/dist/_chunks/index-6GKiz6cY.js +3647 -0
  3. package/dist/_chunks/index-6GKiz6cY.js.map +1 -0
  4. package/dist/_chunks/index-88tSNjQp.mjs +3628 -0
  5. package/dist/_chunks/index-88tSNjQp.mjs.map +1 -0
  6. package/dist/_chunks/index-8de5gkF9.mjs +3628 -0
  7. package/dist/_chunks/index-8de5gkF9.mjs.map +1 -0
  8. package/dist/_chunks/index-AiU03Dmr.js +3647 -0
  9. package/dist/_chunks/index-AiU03Dmr.js.map +1 -0
  10. package/dist/_chunks/index-B-AZlEPV.js +1256 -0
  11. package/dist/_chunks/index-B-AZlEPV.js.map +1 -0
  12. package/dist/_chunks/index-B6H3etpg.mjs +1218 -0
  13. package/dist/_chunks/index-B6H3etpg.mjs.map +1 -0
  14. package/dist/_chunks/index-BDk31lQx.js +1261 -0
  15. package/dist/_chunks/index-BDk31lQx.js.map +1 -0
  16. package/dist/_chunks/index-BK-4ClHX.mjs +3628 -0
  17. package/dist/_chunks/index-BK-4ClHX.mjs.map +1 -0
  18. package/dist/_chunks/index-BMV2FE8e.js +1257 -0
  19. package/dist/_chunks/index-BMV2FE8e.js.map +1 -0
  20. package/dist/_chunks/index-BMsF7dur.mjs +3628 -0
  21. package/dist/_chunks/index-BMsF7dur.mjs.map +1 -0
  22. package/dist/_chunks/index-BOIHTrHJ.js +3647 -0
  23. package/dist/_chunks/index-BOIHTrHJ.js.map +1 -0
  24. package/dist/_chunks/index-BRZDHDl3.mjs +1213 -0
  25. package/dist/_chunks/index-BRZDHDl3.mjs.map +1 -0
  26. package/dist/_chunks/index-BX55VolO.js +3647 -0
  27. package/dist/_chunks/index-BX55VolO.js.map +1 -0
  28. package/dist/_chunks/index-BY10-Cga.mjs +3628 -0
  29. package/dist/_chunks/index-BY10-Cga.mjs.map +1 -0
  30. package/dist/_chunks/index-BZxesXdY.js +1256 -0
  31. package/dist/_chunks/index-BZxesXdY.js.map +1 -0
  32. package/dist/_chunks/index-BlEv36uB.mjs +3628 -0
  33. package/dist/_chunks/index-BlEv36uB.mjs.map +1 -0
  34. package/dist/_chunks/index-BncqbPd9.mjs +1214 -0
  35. package/dist/_chunks/index-BncqbPd9.mjs.map +1 -0
  36. package/dist/_chunks/index-BobGpej6.js +1261 -0
  37. package/dist/_chunks/index-BobGpej6.js.map +1 -0
  38. package/dist/_chunks/index-C8oS3yBE.js +3647 -0
  39. package/dist/_chunks/index-C8oS3yBE.js.map +1 -0
  40. package/dist/_chunks/index-C9I_GZDt.mjs +1213 -0
  41. package/dist/_chunks/index-C9I_GZDt.mjs.map +1 -0
  42. package/dist/_chunks/index-CF-Azguy.mjs +3628 -0
  43. package/dist/_chunks/index-CF-Azguy.mjs.map +1 -0
  44. package/dist/_chunks/index-CFoWn2JU.mjs +1213 -0
  45. package/dist/_chunks/index-CFoWn2JU.mjs.map +1 -0
  46. package/dist/_chunks/index-CFz4k_o3.js +3647 -0
  47. package/dist/_chunks/index-CFz4k_o3.js.map +1 -0
  48. package/dist/_chunks/index-CNmTM2xx.js +1256 -0
  49. package/dist/_chunks/index-CNmTM2xx.js.map +1 -0
  50. package/dist/_chunks/index-COE8JbTB.mjs +3628 -0
  51. package/dist/_chunks/index-COE8JbTB.mjs.map +1 -0
  52. package/dist/_chunks/index-CPar_9LG.mjs +3628 -0
  53. package/dist/_chunks/index-CPar_9LG.mjs.map +1 -0
  54. package/dist/_chunks/index-CUX9tnEj.js +3647 -0
  55. package/dist/_chunks/index-CUX9tnEj.js.map +1 -0
  56. package/dist/_chunks/index-C_IgfuSF.mjs +1218 -0
  57. package/dist/_chunks/index-C_IgfuSF.mjs.map +1 -0
  58. package/dist/_chunks/index-CfK7a1JV.mjs +3628 -0
  59. package/dist/_chunks/index-CfK7a1JV.mjs.map +1 -0
  60. package/dist/_chunks/index-Chvcr1Q8.mjs +1213 -0
  61. package/dist/_chunks/index-Chvcr1Q8.mjs.map +1 -0
  62. package/dist/_chunks/index-Ci-OYPN5.js +1261 -0
  63. package/dist/_chunks/index-Ci-OYPN5.js.map +1 -0
  64. package/dist/_chunks/index-CiyKc7gG.mjs +1218 -0
  65. package/dist/_chunks/index-CiyKc7gG.mjs.map +1 -0
  66. package/dist/_chunks/index-CkSveLKM.js +1256 -0
  67. package/dist/_chunks/index-CkSveLKM.js.map +1 -0
  68. package/dist/_chunks/index-ClOkZMy2.js +1257 -0
  69. package/dist/_chunks/index-ClOkZMy2.js.map +1 -0
  70. package/dist/_chunks/index-CmRSokx-.mjs +3628 -0
  71. package/dist/_chunks/index-CmRSokx-.mjs.map +1 -0
  72. package/dist/_chunks/index-CoLJ0c_K.mjs +3628 -0
  73. package/dist/_chunks/index-CoLJ0c_K.mjs.map +1 -0
  74. package/dist/_chunks/index-Crf1SAxV.js +1256 -0
  75. package/dist/_chunks/index-Crf1SAxV.js.map +1 -0
  76. package/dist/_chunks/index-Cuj1hkXo.js +3647 -0
  77. package/dist/_chunks/index-Cuj1hkXo.js.map +1 -0
  78. package/dist/_chunks/index-CzfnZXVp.mjs +1214 -0
  79. package/dist/_chunks/index-CzfnZXVp.mjs.map +1 -0
  80. package/dist/_chunks/index-D6icTfF7.mjs +1213 -0
  81. package/dist/_chunks/index-D6icTfF7.mjs.map +1 -0
  82. package/dist/_chunks/index-DBSs0Gnl.js +3647 -0
  83. package/dist/_chunks/index-DBSs0Gnl.js.map +1 -0
  84. package/dist/_chunks/index-DDLPHkG8.mjs +3628 -0
  85. package/dist/_chunks/index-DDLPHkG8.mjs.map +1 -0
  86. package/dist/_chunks/index-DEPzWnu9.mjs +1140 -0
  87. package/dist/_chunks/index-DEPzWnu9.mjs.map +1 -0
  88. package/dist/_chunks/index-DGwUX_So.mjs +3628 -0
  89. package/dist/_chunks/index-DGwUX_So.mjs.map +1 -0
  90. package/dist/_chunks/index-DInf_l3P.js +1256 -0
  91. package/dist/_chunks/index-DInf_l3P.js.map +1 -0
  92. package/dist/_chunks/index-DJYtETYy.js +1257 -0
  93. package/dist/_chunks/index-DJYtETYy.js.map +1 -0
  94. package/dist/_chunks/index-DRQ1Oiuk.mjs +1213 -0
  95. package/dist/_chunks/index-DRQ1Oiuk.mjs.map +1 -0
  96. package/dist/_chunks/index-DV-2r9Hy.js +3647 -0
  97. package/dist/_chunks/index-DV-2r9Hy.js.map +1 -0
  98. package/dist/_chunks/index-DW4Jea16.js +3647 -0
  99. package/dist/_chunks/index-DW4Jea16.js.map +1 -0
  100. package/dist/_chunks/index-DXE6Lrtc.js +1256 -0
  101. package/dist/_chunks/index-DXE6Lrtc.js.map +1 -0
  102. package/dist/_chunks/index-DXjWTjxi.mjs +3631 -0
  103. package/dist/_chunks/index-DXjWTjxi.mjs.map +1 -0
  104. package/dist/_chunks/index-Dft0hXXB.js +1161 -0
  105. package/dist/_chunks/index-Dft0hXXB.js.map +1 -0
  106. package/dist/_chunks/index-Dxy-LpJ1.js +3647 -0
  107. package/dist/_chunks/index-Dxy-LpJ1.js.map +1 -0
  108. package/dist/_chunks/index-Dyf9KscK.js +3647 -0
  109. package/dist/_chunks/index-Dyf9KscK.js.map +1 -0
  110. package/dist/_chunks/index-EuuMGGNf.js +3647 -0
  111. package/dist/_chunks/index-EuuMGGNf.js.map +1 -0
  112. package/dist/_chunks/index-G6Uc7lRl.mjs +3628 -0
  113. package/dist/_chunks/index-G6Uc7lRl.mjs.map +1 -0
  114. package/dist/_chunks/index-GPNqedia.js +1261 -0
  115. package/dist/_chunks/index-GPNqedia.js.map +1 -0
  116. package/dist/_chunks/index-NEZx9UPK.js +1261 -0
  117. package/dist/_chunks/index-NEZx9UPK.js.map +1 -0
  118. package/dist/_chunks/index-PZvU_oD7.mjs +1214 -0
  119. package/dist/_chunks/index-PZvU_oD7.mjs.map +1 -0
  120. package/dist/_chunks/index-RE5thGuk.js +3647 -0
  121. package/dist/_chunks/index-RE5thGuk.js.map +1 -0
  122. package/dist/_chunks/index-d1OvLlJZ.mjs +1213 -0
  123. package/dist/_chunks/index-d1OvLlJZ.mjs.map +1 -0
  124. package/dist/_chunks/index-h-Dr31Du.js +3650 -0
  125. package/dist/_chunks/index-h-Dr31Du.js.map +1 -0
  126. package/dist/_chunks/index-hk2wduq_.mjs +3628 -0
  127. package/dist/_chunks/index-hk2wduq_.mjs.map +1 -0
  128. package/dist/_chunks/index-hn4KADGH.mjs +1140 -0
  129. package/dist/_chunks/index-hn4KADGH.mjs.map +1 -0
  130. package/dist/_chunks/index-jZK-hYWE.mjs +1218 -0
  131. package/dist/_chunks/index-jZK-hYWE.mjs.map +1 -0
  132. package/dist/_chunks/index-skWYpmqI.mjs +1218 -0
  133. package/dist/_chunks/index-skWYpmqI.mjs.map +1 -0
  134. package/dist/_chunks/index-uDuIQr5g.js +1161 -0
  135. package/dist/_chunks/index-uDuIQr5g.js.map +1 -0
  136. package/dist/_chunks/index-vi6AKD87.js +3647 -0
  137. package/dist/_chunks/index-vi6AKD87.js.map +1 -0
  138. package/dist/admin/index.js +5 -0
  139. package/dist/admin/index.js.map +1 -0
  140. package/dist/admin/index.mjs +6 -0
  141. package/dist/admin/index.mjs.map +1 -0
  142. package/dist/server/index.js +183 -0
  143. package/dist/server/index.js.map +1 -0
  144. package/dist/server/index.mjs +182 -0
  145. package/dist/server/index.mjs.map +1 -0
  146. package/package.json +53 -24
  147. package/strapi-server.js +2 -2
  148. package/admin/src/CKEditorIcon.js +0 -46
  149. package/admin/src/Input/components/Editor.js +0 -133
  150. package/admin/src/Input/components/MediaLib.js +0 -69
  151. package/admin/src/Input/config/index.js +0 -2
  152. package/admin/src/Input/config/language.js +0 -45
  153. package/admin/src/Input/config/plugins.js +0 -24
  154. package/admin/src/Input/config/presets.js +0 -18
  155. package/admin/src/Input/config/styling.js +0 -30
  156. package/admin/src/Input/index.js +0 -67
  157. package/admin/src/Input/plugins/StrapiMediaLib.js +0 -41
  158. package/admin/src/Input/plugins/StrapiUploadAdapter.js +0 -186
  159. package/admin/src/Input/plugins/index.js +0 -2
  160. package/admin/src/Input/presets/colors.js +0 -122
  161. package/admin/src/Input/presets/default.js +0 -378
  162. package/admin/src/Input/presets/index.js +0 -7
  163. package/admin/src/Input/theme/additional.js +0 -189
  164. package/admin/src/Input/theme/common.js +0 -230
  165. package/admin/src/Input/theme/dark.js +0 -149
  166. package/admin/src/Input/theme/index.js +0 -13
  167. package/admin/src/Input/theme/light.js +0 -144
  168. package/admin/src/index.js +0 -80
  169. package/admin/src/pluginId.js +0 -7
  170. package/admin/src/utils/exportToGlobal.js +0 -8
  171. package/admin/src/utils/getPluginConfig.js +0 -35
  172. package/admin/src/utils/getPresetsOptions.js +0 -38
  173. package/server/controllers/config.js +0 -19
  174. package/server/controllers/index.js +0 -7
  175. package/server/index.js +0 -13
  176. package/server/register.js +0 -11
  177. package/server/routes/index.js +0 -10
  178. package/server/services/config.js +0 -25
  179. package/server/services/index.js +0 -7
  180. package/strapi-admin.js +0 -3
@@ -1,230 +0,0 @@
1
- import { css } from 'styled-components';
2
-
3
- export const common = css`
4
- .ck {
5
- --ck-color-image-caption-background: hsl(0, 0%, 97%);
6
- --ck-color-image-caption-text: hsl(0, 0%, 20%);
7
- --ck-color-mention-background: hsla(341, 100%, 30%, 0.1);
8
- --ck-color-mention-text: hsl(341, 100%, 30%);
9
- --ck-color-table-caption-background: hsl(0, 0%, 97%);
10
- --ck-color-table-caption-text: hsl(0, 0%, 20%);
11
- --ck-highlight-marker-blue: hsl(201, 97%, 72%);
12
- --ck-highlight-marker-green: hsl(120, 93%, 68%);
13
- --ck-highlight-marker-pink: hsl(345, 96%, 73%);
14
- --ck-highlight-marker-yellow: hsl(60, 97%, 73%);
15
- --ck-highlight-pen-green: hsl(112, 100%, 27%);
16
- --ck-highlight-pen-red: hsl(0, 85%, 49%);
17
- --ck-image-style-spacing: 1.5em;
18
- --ck-inline-image-style-spacing: calc(var(--ck-image-style-spacing) / 2);
19
- --ck-todo-list-checkmark-size: 16px;
20
- }
21
-
22
- .ck.ck-sticky-panel .ck-sticky-panel__content_sticky {
23
- top: 64px !important;
24
- }
25
- .ck.ck-reset.ck-dropdown__panel.ck-dropdown__panel_sw.ck-dropdown__panel-visible {
26
- border-radius: 4px;
27
- }
28
-
29
- .ck-editor__main {
30
- --ck-font-face: 'Source Sans Pro', system-ui, Roboto, 'Helvetica Neue',
31
- 'Helvetica', Arial, sans-serif;
32
-
33
- color: var(--ck-color-editor-base-text);
34
- font-family: var(--ck-font-face);
35
-
36
- * {
37
- font: revert;
38
- margin: revert;
39
- }
40
-
41
- h1 {
42
- font-size: 2.3em;
43
- }
44
-
45
- h2 {
46
- font-size: 1.84em;
47
- }
48
-
49
- h3 {
50
- font-size: 1.48em;
51
- }
52
-
53
- h4 {
54
- font-size: 1.22em;
55
- }
56
-
57
- h5 {
58
- font-size: 1.06em;
59
- }
60
-
61
- h6 {
62
- font-size: 1em;
63
- }
64
-
65
- h1,
66
- h2,
67
- h3,
68
- h4,
69
- h5,
70
- h6 {
71
- line-height: 1.2em;
72
- padding-top: 0.8em;
73
- margin-bottom: 0.4em;
74
- }
75
-
76
- blockquote,
77
- ol,
78
- p,
79
- ul {
80
- font-size: 1em;
81
- line-height: 1.6em;
82
- padding-top: 0.2em;
83
- margin-bottom: var(--ck-spacing-large);
84
- }
85
-
86
- figcaption {
87
- background-color: var(--ck-color-image-caption-background);
88
- caption-side: bottom;
89
- color: var(--ck-color-image-caption-text);
90
- display: table-caption;
91
- font-size: 0.75em;
92
- outline-offset: -1px;
93
- padding: 0.6em;
94
- word-break: break-word;
95
- }
96
-
97
- a {
98
- text-decoration: none;
99
- color: #1b3af2;
100
- }
101
-
102
- a:hover {
103
- text-decoration: underline;
104
- }
105
-
106
- .table {
107
- margin: 0;
108
- }
109
-
110
- ul.todo-list {
111
- list-style: none;
112
- margin: revert;
113
- color: revert;
114
- font-family: revert;
115
- margin-left: 2rem;
116
- }
117
-
118
- ul,
119
- ol {
120
- list-style: initial;
121
- margin-left: 2rem;
122
- }
123
-
124
- ol {
125
- list-style: decimal;
126
- }
127
-
128
- sub {
129
- vertical-align: sub;
130
- }
131
-
132
- sup {
133
- vertical-align: super;
134
- }
135
-
136
- .ck.ck-content.ck-editor__editable {
137
- line-height: initial;
138
- min-height: 12.5rem;
139
- border-bottom-left-radius: 0.25rem;
140
- border-bottom-right-radius: 0.25rem;
141
- transition-property: border-color, box-shadow, max-height;
142
- transition-timing-function: ease-in-out;
143
- transition-duration: 0.5s;
144
- &.ck-focused:not(.ck-editor__nested-editable) {
145
- border: 1px solid var(--ck-color-base-border);
146
- /* border: var(--ck-focus-ring); */
147
- box-shadow: none;
148
- transition-property: border-color, box-shadow, max-height;
149
- transition-timing-function: ease-in-out;
150
- transition-duration: 0.5s;
151
- }
152
- }
153
-
154
- .ck-focused,
155
- .ck-blurred {
156
- overflow-y: auto;
157
- overflow-x: hidden;
158
- transition: max-height 0.5s ease-in-out;
159
- ::-webkit-scrollbar {
160
- width: 7px;
161
- }
162
- ::-webkit-scrollbar-track {
163
- background: var(--ck-scroll-track-background);
164
- border: none;
165
- }
166
- ::-webkit-scrollbar-thumb {
167
- transition: background 2s;
168
- background: var(--ck-scroll-thumb-background);
169
- border: 1px solid var(--ck-scroll-thumb-border-color);
170
- }
171
- ::-webkit-scrollbar-thumb:hover {
172
- transition: background 2s;
173
- background: var(--ck-scroll-thumb-hover-background);
174
- }
175
- ::-webkit-scrollbar-thumb:active {
176
- background: var(--ck-scroll-thumb-active-background);
177
- }
178
- }
179
- }
180
-
181
- .ck .ck-source-editing-area textarea {
182
- color: var(--ck-color-text);
183
- background-color: var(--ck-color-base-background);
184
- border: 1px solid var(--ck-color-base-border) !important;
185
- box-shadow: none !important;
186
- }
187
-
188
- .ck .ck-block-toolbar-button {
189
- min-width: 0 !important;
190
- min-height: 0 !important;
191
- width: 20px !important;
192
- height: 25px !important;
193
- margin-left: -2px !important ;
194
-
195
- & svg {
196
- color: var(--ck-color-text) !important;
197
- position: absolute;
198
- width: 20px;
199
- height: 20px;
200
- }
201
- }
202
-
203
- .ck-word-count {
204
- margin-top: 0.3rem;
205
- display: flex;
206
- justify-content: end;
207
- gap: 0.3rem;
208
- font-size: 0.7rem;
209
- font-weight: 500;
210
- text-transform: lowercase;
211
- /* color: #b3b3c4; */
212
- }
213
-
214
- .ck[dir='rtl'] {
215
- .ck-block-toolbar-button {
216
- margin-left: 2px !important ;
217
- }
218
- & + div {
219
- justify-content: flex-start;
220
- & > .ck-word-count {
221
- & > div:first-child {
222
- order: 2;
223
- }
224
- & > div:last-child {
225
- order: 1;
226
- }
227
- }
228
- }
229
- }
230
- `;
@@ -1,149 +0,0 @@
1
- import { css } from 'styled-components';
2
-
3
- export const dark = css`
4
- :root {
5
- --ck-color-focus-outer-shadow: rgba(77, 115, 255, 0.2) !important;
6
- --ck-color-focus-disabled-shadow: rgba(106, 114, 143, 0.4) !important;
7
- --ck-focus-ring: 1px solid #4945ff !important;
8
- --ck-color-button-default-hover-background: #262630 !important;
9
- }
10
-
11
- .ck.ck-powered-by > a > svg > path:first-child {
12
- fill: rgb(236, 236, 236);
13
- }
14
-
15
- .ck.ck-powered-by > a > svg > path:nth-child(3) {
16
- fill: rgb(172, 156, 251);
17
- }
18
-
19
- .ck {
20
- --ck-scroll-track-background: #3d3d57;
21
- --ck-scroll-thumb-background: #181826;
22
- --ck-scroll-thumb-border-color: rgb(70, 70, 70);
23
- --ck-scroll-thumb-hover-background: #202033;
24
- --ck-scroll-thumb-active-background: #2b2b45;
25
-
26
- --ck-color-editor-base-text: rgb(236, 236, 236);
27
- /* Overrides the border radius setting in the theme. */
28
- --ck-border-radius: 4px;
29
-
30
- /* Helper variables to avoid duplication in the colors. */
31
- --ck-color-base-border: #4a4a6a;
32
- --ck-color-base-background: #212134;
33
- --ck-custom-background: #181826;
34
- --ck-custom-foreground: #26263b;
35
- --ck-custom-border: #4a4a6a;
36
- --ck-custom-white: hsl(0, 0%, 100%);
37
-
38
- --ck-color-focus-outer-shadow: #212134;
39
-
40
- --ck-color-base-focus: #bbbaf1;
41
- --ck-color-base-active: #2e2e5c;
42
- --ck-color-base-active-focus: #28284d;
43
-
44
- /* -- Overrides generic colors. ----------------------------------------- */
45
-
46
- --ck-color-base-foreground: var(--ck-custom-background);
47
- --ck-color-focus-border: #6765bd;
48
- --ck-color-text: hsl(0, 0%, 93%);
49
- --ck-color-shadow-drop: hsla(0, 0%, 0%, 0.2);
50
- --ck-color-shadow-inner: hsla(0, 0%, 0%, 0.1);
51
-
52
- /* -- Overrides the default .ck-button class colors. -------------------- */
53
-
54
- --ck-color-button-default-background: rgb(33, 33, 52);
55
-
56
- --ck-color-button-default-hover-background: #262630;
57
- --ck-color-button-default-active-background: #3c3c47;
58
- --ck-color-button-default-active-shadow: #3c3c47;
59
- --ck-color-button-default-disabled-background: var(--ck-custom-background);
60
-
61
- --ck-color-button-on-color: #7b79ff;
62
- --ck-color-button-on-background: #2b2b36;
63
- --ck-color-button-on-hover-background: #30303b;
64
- --ck-color-button-on-active-background: #3c3c47;
65
- --ck-color-button-on-active-shadow: #3c3c47;
66
- --ck-color-button-on-disabled-background: var(--ck-custom-foreground);
67
-
68
- --ck-color-button-action-background: hsl(168, 76%, 42%);
69
- --ck-color-button-action-hover-background: hsl(168, 76%, 38%);
70
- --ck-color-button-action-active-background: hsl(168, 76%, 36%);
71
- --ck-color-button-action-active-shadow: hsl(168, 75%, 34%);
72
- --ck-color-button-action-disabled-background: hsl(168, 76%, 42%);
73
- --ck-color-button-action-text: var(--ck-custom-white);
74
-
75
- --ck-color-button-save: hsl(120, 100%, 46%);
76
- --ck-color-button-cancel: hsl(15, 100%, 56%);
77
-
78
- /* -- Overrides the default .ck-dropdown class colors. ------------------ */
79
-
80
- --ck-color-dropdown-panel-background: var(--ck-custom-background);
81
- --ck-color-dropdown-panel-border: var(--ck-custom-foreground);
82
-
83
- /* -- Overrides the default .ck-splitbutton class colors. --------------- */
84
-
85
- --ck-color-split-button-hover-background: var(
86
- --ck-color-button-default-hover-background
87
- );
88
- --ck-color-split-button-hover-border: var(--ck-custom-foreground);
89
-
90
- /* -- Overrides the default .ck-input class colors. --------------------- */
91
-
92
- --ck-color-input-background: var(--ck-custom-background);
93
- --ck-color-input-border: hsl(257, 3%, 43%);
94
- --ck-color-input-text: hsl(0, 0%, 98%);
95
- --ck-color-input-disabled-background: hsl(255, 4%, 21%);
96
- --ck-color-input-disabled-border: hsl(250, 3%, 38%);
97
- --ck-color-input-disabled-text: hsl(0, 0%, 78%);
98
-
99
- /* -- Overrides the default .ck-labeled-field-view class colors. ---------*/
100
-
101
- --ck-color-labeled-field-label-background: var(--ck-custom-background);
102
-
103
- /* -- Overrides the default .ck-list class colors. ---------------------- */
104
-
105
- --ck-color-list-background: var(--ck-custom-background);
106
- --ck-color-list-button-hover-background: #121221;
107
- --ck-color-list-button-on-background: var(--ck-color-base-active);
108
- --ck-color-list-button-on-background-focus: var(
109
- --ck-color-base-active-focus
110
- );
111
- --ck-color-list-button-on-text: #ffffff;
112
-
113
- /* -- Overrides the default .ck-balloon-panel class colors. ------------- */
114
-
115
- --ck-color-panel-background: var(--ck-custom-background);
116
- --ck-color-panel-border: var(--ck-custom-border);
117
-
118
- /* -- Overrides the default .ck-toolbar class colors. ------------------- */
119
-
120
- --ck-color-toolbar-background: var(--ck-custom-background);
121
- --ck-color-toolbar-border: var(--ck-custom-border);
122
-
123
- /* -- Overrides the default .ck-tooltip class colors. ------------------- */
124
-
125
- --ck-color-tooltip-background: #3a3955;
126
- --ck-color-tooltip-text: hsl(0, 0%, 93%);
127
-
128
- /* -- Overrides the default colors used by the ckeditor5-image package. - */
129
-
130
- --ck-color-image-caption-background: hsl(0, 0%, 97%);
131
- --ck-color-image-caption-text: hsl(0, 0%, 20%);
132
-
133
- /* -- Overrides the default colors used by the ckeditor5-widget package. */
134
-
135
- --ck-color-widget-blurred-border: #7c7c96;
136
- --ck-color-widget-hover-border: #666687;
137
- --ck-color-widget-editable-focus-background: var(--ck-custom-white);
138
-
139
- /* -- Overrides the default colors used by the ckeditor5-link package. -- */
140
-
141
- --ck-color-link-default: hsl(216, 100%, 75%);
142
-
143
- --ck-powered-by-background: transparrent;
144
- --ck-powered-by-border-color: var(--ck-color-base-background);
145
-
146
- --ck-color-dialog-background: var(--ck-custom-background);
147
- --ck-color-dialog-form-header-border: var(--ck-color-base-border);
148
- }
149
- `;
@@ -1,13 +0,0 @@
1
- import { common } from './common';
2
- import { light } from './light';
3
- import { dark } from './dark';
4
- import { additional } from './additional';
5
-
6
- const baseTheme = {
7
- common: common,
8
- light: light,
9
- dark: dark,
10
- additional: additional
11
- }
12
-
13
- export default baseTheme;
@@ -1,144 +0,0 @@
1
- import { css } from 'styled-components';
2
-
3
- export const light = css`
4
- :root {
5
- --ck-color-focus-outer-shadow: rgba(77, 115, 255, 0.2) !important;
6
- --ck-color-focus-disabled-shadow: #e4e3ff !important;
7
- --ck-focus-ring: 1px solid rgb(73, 69, 255) !important;
8
- --ck-color-button-default-hover-background: #f0f0ff !important;
9
- }
10
-
11
- .ck.ck-powered-by > a > svg > path:first-child {
12
- fill: #001234;
13
- }
14
-
15
- .ck {
16
- --ck-scroll-track-background: rgb(242, 242, 242);
17
- --ck-scroll-thumb-background: rgb(236, 236, 236);
18
- --ck-scroll-thumb-border-color: #cdcdf8;
19
- --ck-scroll-thumb-hover-background: #f0f0ff;
20
- --ck-scroll-thumb-active-background: #d9d8ff;
21
-
22
- --ck-color-editor-base-text: #001234;
23
- /* Overrides the border radius setting in the theme. */
24
- --ck-border-radius: 4px;
25
-
26
- /* Helper variables to avoid duplication in the colors. */
27
- --ck-color-base-border: #dcdce4;
28
- --ck-color-base-background: #ffffff;
29
- --ck-custom-background: #ffffff;
30
- --ck-custom-foreground: #dedede;
31
- --ck-custom-border: #dcdce4;
32
- --ck-custom-white: hsl(0, 0%, 100%);
33
-
34
- --ck-color-base-focus: #bbbaf1;
35
- --ck-color-base-active: #f0f0ff;
36
- --ck-color-base-active-focus: #e2e2fd;
37
-
38
- /* -- Overrides generic colors. ----------------------------------------- */
39
-
40
- --ck-color-base-foreground: var(--ck-custom-background);
41
-
42
- --ck-color-focus-border: rgb(73, 69, 255);
43
-
44
- --ck-color-text: #32324d;
45
- --ck-color-shadow-drop: hsla(250, 31%, 80%, 0.1);
46
- --ck-color-shadow-inner: hsla(250, 31%, 80%, 0.1);
47
-
48
- /* -- Overrides the default .ck-button class colors. -------------------- */
49
-
50
- --ck-color-button-default-background: var(--ck-custom-background);
51
- --ck-color-button-default-hover-background: #f0f0ff;
52
- --ck-color-button-default-active-background: #f6f6f9;
53
- --ck-color-button-default-active-shadow: #dedefb;
54
- --ck-color-button-default-disabled-background: var(--ck-custom-background);
55
-
56
- --ck-color-button-on-color: rgb(73, 69, 255);
57
- --ck-color-button-on-background: #f0f0ff;
58
- --ck-color-button-on-hover-background: #e6e9fc;
59
- --ck-color-button-on-active-background: #f6f6f9;
60
- --ck-color-button-on-active-shadow: #cdcdf8;
61
- --ck-color-button-on-disabled-background: var(--ck-custom-foreground);
62
-
63
- --ck-color-button-action-background: hsl(168, 76%, 42%);
64
- --ck-color-button-action-hover-background: hsl(168, 76%, 38%);
65
- --ck-color-button-action-active-background: hsl(168, 76%, 36%);
66
- --ck-color-button-action-active-shadow: hsl(168, 75%, 34%);
67
- --ck-color-button-action-disabled-background: hsl(168, 76%, 42%);
68
- --ck-color-button-action-text: var(--ck-custom-white);
69
-
70
- --ck-color-button-save: hsl(120, 100%, 46%);
71
- --ck-color-button-cancel: hsl(15, 100%, 56%);
72
-
73
- /* -- Overrides the default .ck-dropdown class colors. ------------------ */
74
-
75
- --ck-color-dropdown-panel-background: var(--ck-custom-background);
76
- --ck-color-dropdown-panel-border: var(--ck-custom-foreground);
77
-
78
- /* -- Overrides the default .ck-splitbutton class colors. --------------- */
79
-
80
- --ck-color-split-button-hover-background: var(
81
- --ck-color-button-default-hover-background
82
- );
83
- --ck-color-split-button-hover-border: var(--ck-custom-foreground);
84
-
85
- /* -- Overrides the default .ck-input class colors. --------------------- */
86
-
87
- --ck-color-input-background: var(--ck-custom-background);
88
- --ck-color-input-border: hsl(257, 3%, 43%);
89
- --ck-color-input-text: hsl(0, 0%, 98%);
90
- --ck-color-input-disabled-background: hsl(0, 0%, 97%);
91
- --ck-color-input-disabled-border: rgb(214, 214, 214);
92
- --ck-color-input-disabled-text: hsl(0, 0%, 78%);
93
-
94
- /* -- Overrides the default .ck-labeled-field-view class colors. -------- */
95
-
96
- --ck-color-labeled-field-label-background: var(--ck-custom-background);
97
-
98
- /* -- Overrides the default .ck-list class colors. ---------------------- */
99
-
100
- --ck-color-list-background: var(--ck-custom-background);
101
- --ck-color-list-button-hover-background: #f4f4fb;
102
- --ck-color-list-button-on-background: var(--ck-color-base-active);
103
- --ck-color-list-button-on-background-focus: var(
104
- --ck-color-base-active-focus
105
- );
106
- --ck-color-list-button-on-text: #271fe2;
107
-
108
- /* -- Overrides the default .ck-balloon-panel class colors. ------------- */
109
-
110
- --ck-color-panel-background: var(--ck-custom-background);
111
- --ck-color-panel-border: var(--ck-custom-border);
112
-
113
- /* -- Overrides the default .ck-toolbar class colors. ------------------- */
114
-
115
- --ck-color-toolbar-background: var(--ck-custom-background);
116
- --ck-color-toolbar-border: var(--ck-custom-border);
117
-
118
- /* -- Overrides the default .ck-tooltip class colors. ------------------- */
119
-
120
- --ck-color-tooltip-background: #3a3955;
121
- --ck-color-tooltip-text: hsl(0, 0%, 93%);
122
-
123
- /* -- Overrides the default colors used by the ckeditor5-image package. - */
124
-
125
- --ck-color-image-caption-background: hsl(0, 0%, 97%);
126
- --ck-color-image-caption-text: hsl(0, 0%, 20%);
127
-
128
- /* -- Overrides the default colors used by the ckeditor5-widget package. */
129
-
130
- --ck-color-widget-blurred-border: #cfcffa;
131
- --ck-color-widget-hover-border: #c9c9e4;
132
- --ck-color-widget-editable-focus-background: var(--ck-custom-white);
133
-
134
- /* -- Overrides the default colors used by the ckeditor5-link package. -- */
135
-
136
- --ck-color-link-default: hsl(209, 89%, 33%);
137
-
138
- --ck-powered-by-background: transparrent;
139
- --ck-powered-by-border-color: var(--ck-color-base-background);
140
-
141
- --ck-color-dialog-background: var(--ck-custom-background);
142
- --ck-color-dialog-form-header-border: var(--ck-color-base-border);
143
- }
144
- `;
@@ -1,80 +0,0 @@
1
- import React from 'react';
2
- import * as yup from 'yup';
3
-
4
- import './utils/exportToGlobal';
5
- import { getPresetsOptions } from './utils/getPresetsOptions';
6
- import pluginId from './pluginId';
7
- import CKEditorIcon from './CKEditorIcon';
8
-
9
- export default {
10
- async register(app) {
11
- app.customFields.register({
12
- name: 'CKEditor',
13
- type: 'richtext',
14
- pluginId: pluginId,
15
- icon: CKEditorIcon,
16
- intlLabel: {
17
- id: pluginId + '.label',
18
- defaultMessage: 'CKEditor 5',
19
- },
20
- intlDescription: {
21
- id: pluginId + '.description',
22
- defaultMessage: 'The rich text editor for every use case',
23
- },
24
- components: {
25
- Input: async () => import('./Input'),
26
- },
27
- options: {
28
- base: [
29
- {
30
- intlLabel: {
31
- id: pluginId + '.preset.label',
32
- defaultMessage: 'Preset',
33
- },
34
- description: {
35
- id: pluginId + '.preset.description',
36
- defaultMessage: ' ',
37
- },
38
- name: 'options.preset',
39
- type: 'select',
40
- options: await getPresetsOptions(),
41
- },
42
- ],
43
- advanced: [
44
- {
45
- sectionTitle: null,
46
- items: [
47
- {
48
- name: 'required',
49
- type: 'checkbox',
50
- intlLabel: {
51
- id: pluginId + '.required.label',
52
- defaultMessage: 'Required field',
53
- },
54
- description: {
55
- id: pluginId + 'required.description',
56
- defaultMessage:
57
- "You won't be able to create an entry if this field is empty",
58
- },
59
- },
60
- {
61
- name: 'options.maxLengthCharacters',
62
- type: 'checkbox-with-number-field',
63
- intlLabel: {
64
- id: pluginId + '.maxLength.label',
65
- defaultMessage: 'Maximum length (characters)',
66
- },
67
- },
68
- ],
69
- },
70
- ],
71
- validator: (args) => ({
72
- preset: yup.string().required({
73
- id: pluginId + '.preset.error.required',
74
- defaultMessage: 'Editor preset is required',
75
- }),
76
- }),
77
- },
78
- });
79
- },
80
- };
@@ -1,7 +0,0 @@
1
- const pluginPkg = require('../../package.json');
2
-
3
- const pluginId =
4
- pluginPkg.strapi.name ||
5
- pluginPkg.name.replace(/^(@_sh\/strapi-)plugin-/i, '');
6
-
7
- module.exports = pluginId;
@@ -1,8 +0,0 @@
1
- import * as cke from 'ckeditor5';
2
- import { StrapiMediaLib, StrapiUploadAdapter } from '../Input/plugins';
3
- import { materialColors } from '../Input/presets/colors';
4
-
5
- globalThis.SH_CKE = cke;
6
- globalThis.SH_CKE.StrapiMediaLib = StrapiMediaLib;
7
- globalThis.SH_CKE.StrapiUploadAdapter = StrapiUploadAdapter;
8
- globalThis.SH_CKE.MaterialColors = materialColors;
@@ -1,35 +0,0 @@
1
- import pluginId from '../pluginId';
2
-
3
- const insertConfigScript = () => {
4
- const url =
5
- strapi.backendURL !== '/'
6
- ? `${strapi.backendURL}/${pluginId}/config/ckeditor`
7
- : `/${pluginId}/config/ckeditor`;
8
-
9
- var script = document.createElement('script');
10
- script.id = 'ckeditor-config';
11
- script.src = url;
12
- document.body.appendChild(script);
13
- };
14
-
15
- const waitForConfigToInitialize = async () => {
16
- return new Promise((resolve) => {
17
- (function checkConfigLoaded() {
18
- if (typeof globalThis.SH_CKE_CONFIG !== 'undefined') {
19
- resolve(globalThis.SH_CKE_CONFIG);
20
- } else setTimeout(checkConfigLoaded, 5);
21
- })();
22
- });
23
- };
24
-
25
- export const getPluginConfig = async () => {
26
- // raw config/ckeditor.[js|ts] file
27
- // Can be used with non-JSON serializable properties
28
- insertConfigScript();
29
- const configFromScript = await waitForConfigToInitialize();
30
- if (configFromScript) {
31
- return configFromScript;
32
- }
33
-
34
- return null;
35
- };