@_sh/strapi-plugin-ckeditor 2.0.1 → 2.0.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.
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <img src="assets/ckeditor5_2_0.png" width="700" />
2
+ <img src="https://raw.githubusercontent.com/nshenderov/strapi-plugin-ckeditor/master/assets/ckeditor5_2_0.png" width="700" />
3
3
  </p>
4
4
 
5
5
  <h1 align="center">CKEditor 5 for Strapi</h1>
@@ -61,9 +61,9 @@ It's highly recommended to explore [**the official ckeditor documentation**](htt
61
61
 
62
62
  Content from ckeditor.txt will be passed into a script tag through the initialization process.
63
63
 
64
- > 📂 Default configs: [**admin/src/components/Input/CKEditor/configs**](admin/src/components/Input/CKEditor/configs)
64
+ > 📂 Default configs: [**admin/src/components/Input/CKEditor/configs**](https://github.com/nshenderov/strapi-plugin-ckeditor/blob/master/admin/src/components/Input/CKEditor/configs)
65
65
 
66
- > 📂 Default theme: [**admin/src/components/Input/CKEditor/theme**](admin/src/components/Input/CKEditor/theme)
66
+ > 📂 Default theme: [**admin/src/components/Input/CKEditor/theme**](https://github.com/nshenderov/strapi-plugin-ckeditor/blob/master/admin/src/components/Input/CKEditor/theme)
67
67
 
68
68
  **ckeditor.txt example:**
69
69
 
@@ -167,8 +167,8 @@ globalThis.CKEditorConfig = {
167
167
 
168
168
  language:{
169
169
  // ignorei18n: true,
170
- ui:'he',
171
- content:'he'
170
+ // ui:'he',
171
+ // content:'he'
172
172
  },
173
173
  toolbar: [
174
174
  'heading',
@@ -235,7 +235,7 @@ module.exports = ({ env }) => ({
235
235
  });
236
236
  ```
237
237
 
238
- > In order to display some content from an external source on your `admin` side you should configure your middlewares.js [**check docs about this**](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.html)
238
+ > In order to display some content from an external source on your `admin` side you should configure your middlewares.js [**check the docs about this**](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/required/middlewares.html)
239
239
 
240
240
  ## How to add plugins
241
241
 
@@ -252,7 +252,7 @@ or
252
252
  npm install @ckeditor/ckeditor5-markdown-gfm
253
253
  ```
254
254
 
255
- * your-app/src/armin/**app.js**
255
+ * your-app/src/admin/**app.js**
256
256
 
257
257
  ```js
258
258
  import ckeditor5Dll from "ckeditor5/build/ckeditor5-dll.js";
@@ -378,8 +378,7 @@ yarn build
378
378
  ## <a id="contributing"></a>🛠 Contributing
379
379
  ___
380
380
 
381
- <details>
382
- <summary><b>This section covers the way how to configure your environment if you want to contribute to this package.</b> </summary>
381
+ This section covers the way how to configure your environment if you want to contribute to this package.
383
382
 
384
383
  ### Setting up the environment
385
384
 
@@ -433,11 +432,6 @@ yarn build
433
432
  yarn develop
434
433
  ```
435
434
 
436
- </details>
437
-
438
-
439
-
440
-
441
435
  ## <a id="requirements"></a>⚠️ Requirements
442
436
  ___
443
437
  Strapi **v4.4.0+**
@@ -54,9 +54,8 @@ const Editor = ({ onChange, name, value, disabled, preset, maxLength }) => {
54
54
  editor={window.CKEditor5.editorClassic.ClassicEditor}
55
55
  config={config?.editorConfig}
56
56
  disabled={disabled}
57
- data={value || ""}
57
+ data={value}
58
58
  onReady={(editor) => {
59
- editor.setData(value || "");
60
59
 
61
60
  if(config.editorConfig.WordCountPlugin){
62
61
  const wordCountPlugin = editor.plugins.get( 'WordCount' );
@@ -11,6 +11,52 @@ export const additional = css`
11
11
  max-height: 700px;
12
12
  }
13
13
 
14
+ /* --- color-grid --- */
15
+
16
+ .ck.ck-color-ui-dropdown {
17
+ --ck-color-grid-tile-size: 22px !important;
18
+ }
19
+ .ck.ck-color-grid__tile{
20
+ width:auto;
21
+ }
22
+ .ck.ck-color-ui-dropdown .ck-color-grid {
23
+ grid-gap: 2px;
24
+ }
25
+ .ck.ck-color-ui-dropdown .ck-color-grid .ck-button {
26
+ border-radius: 2px;
27
+ }
28
+ .ck.ck-color-ui-dropdown .ck.ck-color-grid .ck-color-grid__tile:hover:not(.ck-disabled),
29
+ .ck.ck-color-ui-dropdown .ck.ck-color-grid .ck-color-grid__tile:focus:not(.ck-disabled) {
30
+ z-index: 1;
31
+ transform: scale(1.1);
32
+ border-radius: 2px;
33
+ }
34
+
35
+ /* --- color-picker --- */
36
+
37
+ .ck[dir=rtl] .ck-color-input{
38
+ margin: 0 8px 8px 0 !important;
39
+ padding: 3px 5px 0 0 !important;
40
+ }
41
+
42
+ .ck .ck-color-input{
43
+ margin: 0 0 8px 8px ;
44
+ padding: 3px 0 0 6px;
45
+ border-radius:2px ;
46
+ font-size:.77rem !important;
47
+ width: 58px !important;
48
+ }
49
+ .ck .ck-color-picker{
50
+ margin: 0 3px 8px 3px;
51
+ border-radius:2px !important;
52
+ width: 27px !important;
53
+ }
54
+ .ck .ck-color-picker-save{
55
+ margin: 0 0 8px 0;
56
+ border-radius:2px !important;
57
+ width:27px !important;
58
+ }
59
+
14
60
 
15
61
  /* ---- Style feature config ------------------------------------------------------ */
16
62
 
@@ -217,10 +217,6 @@ export const common = css`
217
217
  .ck-block-toolbar-button {
218
218
  margin-left: 2px !important ;
219
219
  }
220
- .ck-color-input{
221
- margin: 0 8px 8px 0 !important;
222
- padding: 3px 5px 0 0 !important;
223
- }
224
220
  & + div{
225
221
  justify-content: flex-start;
226
222
  & > .ck-word-count {
@@ -233,45 +229,4 @@ export const common = css`
233
229
  }
234
230
  }
235
231
  }
236
-
237
-
238
- .ck .ck-color-input{
239
- margin: 0 0 8px 8px !important;
240
- padding: 3px 0 0 5px !important;
241
- border-radius:0px !important;
242
- width: 115px !important;
243
- z-index: 1;
244
- }
245
-
246
- .ck .ck-color-picker{
247
- margin: 0 3px 8px 3px !important;
248
- border-radius:0px !important;
249
- width: 80px !important;
250
- }
251
-
252
- .ck .ck-color-picker-save{
253
- margin: 0 0 8px 0 !important;
254
- border-radius:0px !important;
255
- width: 50px !important;
256
- }
257
-
258
-
259
- .ck.ck-color-ui-dropdown {
260
- --ck-color-grid-tile-size: 20px;
261
- }
262
-
263
- .ck.ck-color-ui-dropdown .ck-color-grid {
264
- grid-gap: 1px;
265
- }
266
-
267
- .ck.ck-color-ui-dropdown .ck-color-grid .ck-button {
268
- border-radius: 0;
269
- }
270
-
271
- .ck.ck-color-ui-dropdown .ck.ck-color-grid .ck-color-grid__tile:hover:not(.ck-disabled),
272
- .ck.ck-color-ui-dropdown .ck.ck-color-grid .ck-color-grid__tile:focus:not(.ck-disabled) {
273
- z-index: 1;
274
- transform: scale(1.3);
275
- }
276
-
277
232
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@_sh/strapi-plugin-ckeditor",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "Integrates CKEditor 5 into your Strapi project as a fully customizable custom field. (Unofficial integration)",
5
5
  "private": false,
6
6
  "keywords": [