@_sh/strapi-plugin-ckeditor 6.0.3 → 7.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/README.md +7 -7
- package/dist/_chunks/{Field-C5uO1-1c.mjs → Field-C2N3FIDl.mjs} +50 -15
- package/dist/_chunks/{Field-Bjfn0oud.js → Field-LK0YigdM.js} +49 -14
- package/dist/_chunks/{index-CwLpvdFD.mjs → index-Be7yVVtW.mjs} +190 -197
- package/dist/_chunks/{index-D48ig74s.js → index-BmYyqc_l.js} +191 -198
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/server/index.js +33 -31
- package/dist/server/index.mjs +33 -31
- package/package.json +33 -31
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const yup = require("yup");
|
|
3
|
+
const cloneDeep = require("lodash/cloneDeep");
|
|
3
4
|
const styledComponents = require("styled-components");
|
|
4
5
|
const ckeditor5 = require("ckeditor5");
|
|
5
6
|
const sanitizeHtml = require("sanitize-html");
|
|
6
7
|
const jsxRuntime = require("react/jsx-runtime");
|
|
7
8
|
const designSystem = require("@strapi/design-system");
|
|
8
|
-
const cloneDeep = require("lodash/cloneDeep");
|
|
9
9
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
10
10
|
function _interopNamespace(e) {
|
|
11
11
|
if (e && e.__esModule) return e;
|
|
@@ -25,148 +25,8 @@ function _interopNamespace(e) {
|
|
|
25
25
|
return Object.freeze(n);
|
|
26
26
|
}
|
|
27
27
|
const yup__namespace = /* @__PURE__ */ _interopNamespace(yup);
|
|
28
|
-
const sanitizeHtml__namespace = /* @__PURE__ */ _interopNamespace(sanitizeHtml);
|
|
29
28
|
const cloneDeep__default = /* @__PURE__ */ _interopDefault(cloneDeep);
|
|
30
|
-
const
|
|
31
|
-
const version = "6.0.3";
|
|
32
|
-
const description = "Integrates CKEditor 5 into your Strapi project as a fully customizable custom field. (Community Edition)";
|
|
33
|
-
const keywords = [
|
|
34
|
-
"strapi",
|
|
35
|
-
"ckeditor",
|
|
36
|
-
"ckeditor5",
|
|
37
|
-
"ckeditor 5",
|
|
38
|
-
"wysiwyg",
|
|
39
|
-
"rich text",
|
|
40
|
-
"editor"
|
|
41
|
-
];
|
|
42
|
-
const author = {
|
|
43
|
-
name: "nshenderov"
|
|
44
|
-
};
|
|
45
|
-
const homepage = "https://market.strapi.io/plugins/@_sh-strapi-plugin-ckeditor";
|
|
46
|
-
const repository = {
|
|
47
|
-
type: "git",
|
|
48
|
-
url: "https://github.com/nshenderov/strapi-plugin-ckeditor.git"
|
|
49
|
-
};
|
|
50
|
-
const strapi = {
|
|
51
|
-
name: "ckeditor5",
|
|
52
|
-
displayName: "CKEditor 5",
|
|
53
|
-
description: "Integrates CKEditor 5 into your Strapi project as a fully customizable custom field. (Community Edition)",
|
|
54
|
-
kind: "plugin"
|
|
55
|
-
};
|
|
56
|
-
const type = "commonjs";
|
|
57
|
-
const exports$1 = {
|
|
58
|
-
"./package.json": "./package.json",
|
|
59
|
-
".": {
|
|
60
|
-
types: "./dist/admin/src/index.d.ts",
|
|
61
|
-
source: "./admin/src/index.ts",
|
|
62
|
-
"import": "./dist/admin/index.mjs",
|
|
63
|
-
require: "./dist/admin/index.js",
|
|
64
|
-
"default": "./dist/admin/index.js"
|
|
65
|
-
},
|
|
66
|
-
"./strapi-admin": {
|
|
67
|
-
types: "./dist/admin/src/index.d.ts",
|
|
68
|
-
source: "./admin/src/index.ts",
|
|
69
|
-
"import": "./dist/admin/index.mjs",
|
|
70
|
-
require: "./dist/admin/index.js",
|
|
71
|
-
"default": "./dist/admin/index.js"
|
|
72
|
-
},
|
|
73
|
-
"./strapi-server": {
|
|
74
|
-
types: "./dist/server/src/index.d.ts",
|
|
75
|
-
source: "./server/src/index.ts",
|
|
76
|
-
"import": "./dist/server/index.mjs",
|
|
77
|
-
require: "./dist/server/index.js",
|
|
78
|
-
"default": "./dist/server/index.js"
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
const files = [
|
|
82
|
-
"dist"
|
|
83
|
-
];
|
|
84
|
-
const scripts = {
|
|
85
|
-
build: "strapi-plugin build",
|
|
86
|
-
watch: "strapi-plugin watch",
|
|
87
|
-
"watch:link": "strapi-plugin watch:link",
|
|
88
|
-
verify: "strapi-plugin verify",
|
|
89
|
-
"test:ts:front": "run -T tsc -p admin/tsconfig.json",
|
|
90
|
-
"test:ts:back": "run -T tsc -p server/tsconfig.json",
|
|
91
|
-
release: "release-it",
|
|
92
|
-
"release:info": "release-it --changelog"
|
|
93
|
-
};
|
|
94
|
-
const dependencies = {
|
|
95
|
-
"@ckeditor/ckeditor5-react": "~9.5.0",
|
|
96
|
-
"@strapi/design-system": "2.0.0-rc.18",
|
|
97
|
-
"@strapi/icons": "2.0.0-rc.18",
|
|
98
|
-
ckeditor5: "~45.2.0",
|
|
99
|
-
lodash: "4.17.21",
|
|
100
|
-
"sanitize-html": "2.13.0",
|
|
101
|
-
yup: "0.32.9"
|
|
102
|
-
};
|
|
103
|
-
const devDependencies = {
|
|
104
|
-
"@release-it/conventional-changelog": "10.0.0",
|
|
105
|
-
"@strapi/sdk-plugin": "5.3.2",
|
|
106
|
-
"@strapi/strapi": "5.11.0",
|
|
107
|
-
"@strapi/typescript-utils": "5.11.0",
|
|
108
|
-
"@types/react": "^18.3.12",
|
|
109
|
-
"@types/react-dom": "^18.3.1",
|
|
110
|
-
"@types/sanitize-html": "2.13.0",
|
|
111
|
-
"@typescript-eslint/eslint-plugin": "7.0.0",
|
|
112
|
-
"@typescript-eslint/parser": "7.0.0",
|
|
113
|
-
eslint: "8.2.0",
|
|
114
|
-
"eslint-config-airbnb": "19.0.4",
|
|
115
|
-
"eslint-config-airbnb-typescript": "18.0.0",
|
|
116
|
-
"eslint-config-prettier": "9.1.0",
|
|
117
|
-
"eslint-plugin-import": "2.25.3",
|
|
118
|
-
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
119
|
-
"eslint-plugin-prettier": "5.2.1",
|
|
120
|
-
"eslint-plugin-react": "7.28.0",
|
|
121
|
-
"eslint-plugin-react-hooks": "4.3.0",
|
|
122
|
-
prettier: "3.4.0",
|
|
123
|
-
react: "18.3.1",
|
|
124
|
-
"react-dom": "18.3.1",
|
|
125
|
-
"react-router-dom": "6.30.0",
|
|
126
|
-
"release-it": "18.1.2",
|
|
127
|
-
"styled-components": "6.1.15",
|
|
128
|
-
typescript: "5.6.3"
|
|
129
|
-
};
|
|
130
|
-
const peerDependencies = {
|
|
131
|
-
"@strapi/strapi": "^5.0.0",
|
|
132
|
-
react: "^18.0.0",
|
|
133
|
-
"react-dom": "^18.0.0",
|
|
134
|
-
"react-router-dom": "^6.0.0",
|
|
135
|
-
"styled-components": "^6.0.0"
|
|
136
|
-
};
|
|
137
|
-
const engines = {
|
|
138
|
-
node: ">=18.0.0 <=22.x.x",
|
|
139
|
-
npm: ">=6.0.0"
|
|
140
|
-
};
|
|
141
|
-
const license = "MIT";
|
|
142
|
-
const pluginPkg = {
|
|
143
|
-
name,
|
|
144
|
-
version,
|
|
145
|
-
description,
|
|
146
|
-
keywords,
|
|
147
|
-
author,
|
|
148
|
-
homepage,
|
|
149
|
-
repository,
|
|
150
|
-
strapi,
|
|
151
|
-
type,
|
|
152
|
-
exports: exports$1,
|
|
153
|
-
files,
|
|
154
|
-
scripts,
|
|
155
|
-
dependencies,
|
|
156
|
-
devDependencies,
|
|
157
|
-
peerDependencies,
|
|
158
|
-
engines,
|
|
159
|
-
license
|
|
160
|
-
};
|
|
161
|
-
const PLUGIN_ID = pluginPkg.strapi.name;
|
|
162
|
-
function isImageResponsive(imgFormats) {
|
|
163
|
-
const formats = Object.keys(imgFormats);
|
|
164
|
-
const isResponsive = !(formats.length === 1 && formats[0] === "thumbnail");
|
|
165
|
-
return isResponsive;
|
|
166
|
-
}
|
|
167
|
-
function prefixFileUrlWithBackendUrl(fileURL) {
|
|
168
|
-
return !!fileURL && fileURL.startsWith("/") ? `${window.strapi.backendURL}${fileURL}` : fileURL;
|
|
169
|
-
}
|
|
29
|
+
const sanitizeHtml__namespace = /* @__PURE__ */ _interopNamespace(sanitizeHtml);
|
|
170
30
|
const colors = styledComponents.css`
|
|
171
31
|
${({ theme }) => styledComponents.css`
|
|
172
32
|
:root {
|
|
@@ -184,7 +44,7 @@ const colors = styledComponents.css`
|
|
|
184
44
|
--ck-color-base-focus: ${theme.colors.primary200};
|
|
185
45
|
--ck-color-base-active: ${theme.colors.primary500}8F;
|
|
186
46
|
--ck-color-base-active-focus: ${theme.colors.primary600};
|
|
187
|
-
--ck-
|
|
47
|
+
--ck-content-font-color: ${theme.colors.neutral800};
|
|
188
48
|
--ck-color-base-border: ${theme.colors.neutral200};
|
|
189
49
|
--ck-color-base-background: ${theme.colors.neutral0};
|
|
190
50
|
--ck-custom-foreground: ${theme.colors.neutral200};
|
|
@@ -270,8 +130,13 @@ const colors = styledComponents.css`
|
|
|
270
130
|
|
|
271
131
|
/* -- Image ------------------------------------------------------------------------------- */
|
|
272
132
|
|
|
273
|
-
--ck-color-image-caption-background: ${theme.colors.neutral100};
|
|
274
|
-
--ck-color-image-caption-text: ${theme.colors.neutral800};
|
|
133
|
+
--ck-content-color-image-caption-background: ${theme.colors.neutral100};
|
|
134
|
+
--ck-content-color-image-caption-text: ${theme.colors.neutral800};
|
|
135
|
+
|
|
136
|
+
/* -- Table ------------------------------------------------------------------------------- */
|
|
137
|
+
|
|
138
|
+
--ck-content-color-table-caption-background: ${theme.colors.neutral100};
|
|
139
|
+
--ck-content-color-table-caption-text: ${theme.colors.neutral800};
|
|
275
140
|
|
|
276
141
|
/* -- Widget ------------------------------------------------------------------------------ */
|
|
277
142
|
|
|
@@ -310,18 +175,18 @@ const dark = styledComponents.css`
|
|
|
310
175
|
const reset = styledComponents.css`
|
|
311
176
|
${({ theme }) => styledComponents.css`
|
|
312
177
|
.ck {
|
|
313
|
-
--ck-color-image-caption-background: hsl(0, 0%, 97%);
|
|
314
|
-
--ck-color-image-caption-text: hsl(0, 0%, 20%);
|
|
315
|
-
--ck-color-mention-background: hsla(341, 100%, 30%, 0.1);
|
|
316
|
-
--ck-color-mention-text: hsl(341, 100%, 30%);
|
|
178
|
+
--ck-content-color-image-caption-background: hsl(0, 0%, 97%);
|
|
179
|
+
--ck-content-color-image-caption-text: hsl(0, 0%, 20%);
|
|
180
|
+
--ck-content-color-mention-background: hsla(341, 100%, 30%, 0.1);
|
|
181
|
+
--ck-content-color-mention-text: hsl(341, 100%, 30%);
|
|
317
182
|
--ck-color-table-caption-background: hsl(0, 0%, 97%);
|
|
318
183
|
--ck-color-table-caption-text: hsl(0, 0%, 20%);
|
|
319
|
-
--ck-highlight-marker-blue: hsl(201, 97%, 72%);
|
|
320
|
-
--ck-highlight-marker-green: hsl(120, 93%, 68%);
|
|
321
|
-
--ck-highlight-marker-pink: hsl(345, 96%, 73%);
|
|
322
|
-
--ck-highlight-marker-yellow: hsl(60, 97%, 73%);
|
|
323
|
-
--ck-highlight-pen-green: hsl(112, 100%, 27%);
|
|
324
|
-
--ck-highlight-pen-red: hsl(0, 85%, 49%);
|
|
184
|
+
--ck-content-highlight-marker-blue: hsl(201, 97%, 72%);
|
|
185
|
+
--ck-content-highlight-marker-green: hsl(120, 93%, 68%);
|
|
186
|
+
--ck-content-highlight-marker-pink: hsl(345, 96%, 73%);
|
|
187
|
+
--ck-content-highlight-marker-yellow: hsl(60, 97%, 73%);
|
|
188
|
+
--ck-content-highlight-pen-green: hsl(112, 100%, 27%);
|
|
189
|
+
--ck-content-highlight-pen-red: hsl(0, 85%, 49%);
|
|
325
190
|
--ck-image-style-spacing: 1.5em;
|
|
326
191
|
--ck-inline-image-style-spacing: calc(var(--ck-image-style-spacing) / 2);
|
|
327
192
|
--ck-todo-list-checkmark-size: 16px;
|
|
@@ -338,7 +203,6 @@ const reset = styledComponents.css`
|
|
|
338
203
|
--ck-font-face: 'Source Sans Pro', system-ui, Roboto, 'Helvetica Neue', 'Helvetica', Arial,
|
|
339
204
|
sans-serif;
|
|
340
205
|
|
|
341
|
-
color: var(--ck-color-editor-base-text);
|
|
342
206
|
font-family: var(--ck-font-face);
|
|
343
207
|
|
|
344
208
|
* {
|
|
@@ -346,41 +210,6 @@ const reset = styledComponents.css`
|
|
|
346
210
|
margin: revert;
|
|
347
211
|
}
|
|
348
212
|
|
|
349
|
-
h1 {
|
|
350
|
-
font-size: 2.3em;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
h2 {
|
|
354
|
-
font-size: 1.84em;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
h3 {
|
|
358
|
-
font-size: 1.48em;
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
h4 {
|
|
362
|
-
font-size: 1.22em;
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
h5 {
|
|
366
|
-
font-size: 1.06em;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
h6 {
|
|
370
|
-
font-size: 1em;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
h1,
|
|
374
|
-
h2,
|
|
375
|
-
h3,
|
|
376
|
-
h4,
|
|
377
|
-
h5,
|
|
378
|
-
h6 {
|
|
379
|
-
line-height: 1.2em;
|
|
380
|
-
padding-top: 0.8em;
|
|
381
|
-
margin-bottom: 0.4em;
|
|
382
|
-
}
|
|
383
|
-
|
|
384
213
|
blockquote,
|
|
385
214
|
ol,
|
|
386
215
|
p,
|
|
@@ -392,9 +221,9 @@ const reset = styledComponents.css`
|
|
|
392
221
|
}
|
|
393
222
|
|
|
394
223
|
figcaption {
|
|
395
|
-
background-color: var(--ck-color-image-caption-background);
|
|
224
|
+
background-color: var(--ck-content-color-image-caption-background);
|
|
396
225
|
caption-side: bottom;
|
|
397
|
-
color: var(--ck-color-image-caption-text);
|
|
226
|
+
color: var(--ck-content-color-image-caption-text);
|
|
398
227
|
display: table-caption;
|
|
399
228
|
font-size: 0.75em;
|
|
400
229
|
outline-offset: -1px;
|
|
@@ -440,6 +269,11 @@ const reset = styledComponents.css`
|
|
|
440
269
|
sup {
|
|
441
270
|
vertical-align: super;
|
|
442
271
|
}
|
|
272
|
+
|
|
273
|
+
.ck-input-text.raw-html-embed__source,
|
|
274
|
+
.ck-button.raw-html-embed__edit-button {
|
|
275
|
+
color: var(--ck-color-text);
|
|
276
|
+
}
|
|
443
277
|
}
|
|
444
278
|
`}
|
|
445
279
|
`;
|
|
@@ -537,7 +371,7 @@ const plugin = styledComponents.css`
|
|
|
537
371
|
}
|
|
538
372
|
|
|
539
373
|
.ck.ck-editor__editable > .ck-placeholder::before {
|
|
540
|
-
color: var(--ck-
|
|
374
|
+
color: var(--ck-content-font-color);
|
|
541
375
|
opacity: 0.65;
|
|
542
376
|
}
|
|
543
377
|
|
|
@@ -656,6 +490,148 @@ class StrapiMediaLib extends ckeditor5.Plugin {
|
|
|
656
490
|
this.strapiToggle();
|
|
657
491
|
}
|
|
658
492
|
}
|
|
493
|
+
const name = "@_sh/strapi-plugin-ckeditor";
|
|
494
|
+
const version = "7.0.0";
|
|
495
|
+
const description = "Integrates CKEditor 5 into your Strapi project as a fully customizable custom field. (Community Edition)";
|
|
496
|
+
const keywords = [
|
|
497
|
+
"strapi",
|
|
498
|
+
"ckeditor",
|
|
499
|
+
"ckeditor5",
|
|
500
|
+
"ckeditor 5",
|
|
501
|
+
"wysiwyg",
|
|
502
|
+
"rich text",
|
|
503
|
+
"editor"
|
|
504
|
+
];
|
|
505
|
+
const author = {
|
|
506
|
+
name: "nshenderov"
|
|
507
|
+
};
|
|
508
|
+
const homepage = "https://market.strapi.io/plugins/@_sh-strapi-plugin-ckeditor";
|
|
509
|
+
const repository = {
|
|
510
|
+
type: "git",
|
|
511
|
+
url: "https://github.com/nshenderov/strapi-plugin-ckeditor.git"
|
|
512
|
+
};
|
|
513
|
+
const strapi = {
|
|
514
|
+
name: "ckeditor5",
|
|
515
|
+
displayName: "CKEditor 5",
|
|
516
|
+
description: "Integrates CKEditor 5 into your Strapi project as a fully customizable custom field. (Community Edition)",
|
|
517
|
+
kind: "plugin"
|
|
518
|
+
};
|
|
519
|
+
const type = "commonjs";
|
|
520
|
+
const exports$2 = {
|
|
521
|
+
"./package.json": "./package.json",
|
|
522
|
+
".": {
|
|
523
|
+
types: "./dist/admin/src/index.d.ts",
|
|
524
|
+
source: "./admin/src/index.ts",
|
|
525
|
+
"import": "./dist/admin/index.mjs",
|
|
526
|
+
require: "./dist/admin/index.js",
|
|
527
|
+
"default": "./dist/admin/index.js"
|
|
528
|
+
},
|
|
529
|
+
"./strapi-admin": {
|
|
530
|
+
types: "./dist/admin/src/index.d.ts",
|
|
531
|
+
source: "./admin/src/index.ts",
|
|
532
|
+
"import": "./dist/admin/index.mjs",
|
|
533
|
+
require: "./dist/admin/index.js",
|
|
534
|
+
"default": "./dist/admin/index.js"
|
|
535
|
+
},
|
|
536
|
+
"./strapi-server": {
|
|
537
|
+
types: "./dist/server/src/index.d.ts",
|
|
538
|
+
source: "./server/src/index.ts",
|
|
539
|
+
"import": "./dist/server/index.mjs",
|
|
540
|
+
require: "./dist/server/index.js",
|
|
541
|
+
"default": "./dist/server/index.js"
|
|
542
|
+
}
|
|
543
|
+
};
|
|
544
|
+
const files = [
|
|
545
|
+
"dist"
|
|
546
|
+
];
|
|
547
|
+
const scripts = {
|
|
548
|
+
build: "strapi-plugin build",
|
|
549
|
+
watch: "strapi-plugin watch",
|
|
550
|
+
"watch:link": "strapi-plugin watch:link",
|
|
551
|
+
verify: "strapi-plugin verify",
|
|
552
|
+
"test:ts:front": "run -T tsc -p admin/tsconfig.json",
|
|
553
|
+
"test:ts:back": "run -T tsc -p server/tsconfig.json",
|
|
554
|
+
release: "release-it",
|
|
555
|
+
"release:info": "release-it --changelog",
|
|
556
|
+
"lint:ts": "eslint . --ext ts,tsx --report-unused-disable-directives",
|
|
557
|
+
"lint:ts:fix": "eslint . --ext ts,tsx --report-unused-disable-directives --fix"
|
|
558
|
+
};
|
|
559
|
+
const dependencies = {
|
|
560
|
+
"@ckeditor/ckeditor5-react": "~11.0.1",
|
|
561
|
+
"@strapi/design-system": "2.1.2",
|
|
562
|
+
"@strapi/icons": "2.1.2",
|
|
563
|
+
ckeditor5: "~47.4.0",
|
|
564
|
+
lodash: "4.17.21",
|
|
565
|
+
"sanitize-html": "2.13.0",
|
|
566
|
+
yup: "0.32.9"
|
|
567
|
+
};
|
|
568
|
+
const devDependencies = {
|
|
569
|
+
"@release-it/conventional-changelog": "10.0.0",
|
|
570
|
+
"@strapi/sdk-plugin": "5.4.0",
|
|
571
|
+
"@strapi/strapi": "5.33.4",
|
|
572
|
+
"@strapi/typescript-utils": "5.33.4",
|
|
573
|
+
"@types/react": "^18.0.0",
|
|
574
|
+
"@types/react-dom": "^18.0.0",
|
|
575
|
+
"@types/sanitize-html": "^2.13.0",
|
|
576
|
+
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
|
577
|
+
"@typescript-eslint/parser": "^7.0.0",
|
|
578
|
+
eslint: "^8.2.0",
|
|
579
|
+
"eslint-config-airbnb": "^19.0.4",
|
|
580
|
+
"eslint-config-airbnb-typescript": "^18.0.0",
|
|
581
|
+
"eslint-config-prettier": "^9.1.0",
|
|
582
|
+
"eslint-plugin-import": "^2.25.3",
|
|
583
|
+
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
584
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
585
|
+
"eslint-plugin-react": "^7.28.0",
|
|
586
|
+
"eslint-plugin-react-hooks": "^4.3.0",
|
|
587
|
+
prettier: "^3.4.0",
|
|
588
|
+
"release-it": "^18.1.2",
|
|
589
|
+
typescript: "5.6.3",
|
|
590
|
+
react: "^18.0.0",
|
|
591
|
+
"react-dom": "^18.0.0",
|
|
592
|
+
"react-router-dom": "^6.0.0",
|
|
593
|
+
"styled-components": "^6.0.0"
|
|
594
|
+
};
|
|
595
|
+
const peerDependencies = {
|
|
596
|
+
"@strapi/strapi": "^5.0.0",
|
|
597
|
+
react: "^18.0.0",
|
|
598
|
+
"react-dom": "^18.0.0",
|
|
599
|
+
"react-router-dom": "^6.0.0",
|
|
600
|
+
"styled-components": "^6.0.0"
|
|
601
|
+
};
|
|
602
|
+
const engines = {
|
|
603
|
+
node: ">=20.0.0 <=24.x.x",
|
|
604
|
+
npm: ">=6.0.0"
|
|
605
|
+
};
|
|
606
|
+
const license = "MIT";
|
|
607
|
+
const pluginPkg = {
|
|
608
|
+
name,
|
|
609
|
+
version,
|
|
610
|
+
description,
|
|
611
|
+
keywords,
|
|
612
|
+
author,
|
|
613
|
+
homepage,
|
|
614
|
+
repository,
|
|
615
|
+
strapi,
|
|
616
|
+
type,
|
|
617
|
+
exports: exports$2,
|
|
618
|
+
files,
|
|
619
|
+
scripts,
|
|
620
|
+
dependencies,
|
|
621
|
+
devDependencies,
|
|
622
|
+
peerDependencies,
|
|
623
|
+
engines,
|
|
624
|
+
license
|
|
625
|
+
};
|
|
626
|
+
const PLUGIN_ID = pluginPkg.strapi.name;
|
|
627
|
+
function isImageResponsive(imgFormats) {
|
|
628
|
+
const formats = Object.keys(imgFormats);
|
|
629
|
+
const isResponsive = !(formats.length === 1 && formats[0] === "thumbnail");
|
|
630
|
+
return isResponsive;
|
|
631
|
+
}
|
|
632
|
+
function prefixFileUrlWithBackendUrl(fileURL) {
|
|
633
|
+
return !!fileURL && fileURL.startsWith("/") ? `${window.strapi.backendURL}${fileURL}` : fileURL;
|
|
634
|
+
}
|
|
659
635
|
class StrapiUploadAdapter extends ckeditor5.Plugin {
|
|
660
636
|
static get requires() {
|
|
661
637
|
return [ckeditor5.FileRepository];
|
|
@@ -1207,6 +1183,20 @@ function getPluginTheme() {
|
|
|
1207
1183
|
function getPluginConfig() {
|
|
1208
1184
|
return PLUGIN_CONFIG;
|
|
1209
1185
|
}
|
|
1186
|
+
const clonedDefaultTheme = cloneDeep__default.default(defaultTheme);
|
|
1187
|
+
const clonedDefaultHtmlPreset = cloneDeep__default.default(defaultHtmlPreset);
|
|
1188
|
+
const clonedDefaultMarkdownPreset = cloneDeep__default.default(defaultMarkdownPreset);
|
|
1189
|
+
const exports$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1190
|
+
__proto__: null,
|
|
1191
|
+
StrapiMediaLib,
|
|
1192
|
+
StrapiUploadAdapter,
|
|
1193
|
+
defaultHtmlPreset: clonedDefaultHtmlPreset,
|
|
1194
|
+
defaultMarkdownPreset: clonedDefaultMarkdownPreset,
|
|
1195
|
+
defaultTheme: clonedDefaultTheme,
|
|
1196
|
+
getPluginPresets,
|
|
1197
|
+
getPluginTheme,
|
|
1198
|
+
setPluginConfig
|
|
1199
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
1210
1200
|
function CKEditorIcon() {
|
|
1211
1201
|
return /* @__PURE__ */ jsxRuntime.jsx(IconBox, { justifyContent: "center", alignItems: "center", width: 7, height: 6, hasRadius: true, "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx(SvgIcon, {}) });
|
|
1212
1202
|
}
|
|
@@ -1232,9 +1222,6 @@ const IconBox = styledComponents.styled(designSystem.Flex)`
|
|
|
1232
1222
|
background-color: ${designSystem.lightTheme.colors.secondary100};
|
|
1233
1223
|
border: 1px solid ${designSystem.lightTheme.colors.secondary200};
|
|
1234
1224
|
`;
|
|
1235
|
-
const clonedDefaultTheme = cloneDeep__default.default(defaultTheme);
|
|
1236
|
-
const clonedDefaultHtmlPreset = cloneDeep__default.default(defaultHtmlPreset);
|
|
1237
|
-
const clonedDefaultMarkdownPreset = cloneDeep__default.default(defaultMarkdownPreset);
|
|
1238
1225
|
const AVAILABLE_OPTIONS = [];
|
|
1239
1226
|
function fillAvailableOptions() {
|
|
1240
1227
|
const { presets } = getPluginConfig();
|
|
@@ -1257,6 +1244,12 @@ const index = {
|
|
|
1257
1244
|
fillAvailableOptions();
|
|
1258
1245
|
},
|
|
1259
1246
|
async register(app) {
|
|
1247
|
+
app.registerPlugin({
|
|
1248
|
+
id: PLUGIN_ID,
|
|
1249
|
+
isReady: true,
|
|
1250
|
+
name: "CKEditor",
|
|
1251
|
+
apis: exports$1
|
|
1252
|
+
});
|
|
1260
1253
|
app.customFields.register({
|
|
1261
1254
|
name: "CKEditor",
|
|
1262
1255
|
type: "richtext",
|
|
@@ -1271,7 +1264,7 @@ const index = {
|
|
|
1271
1264
|
defaultMessage: "The advanced rich text editor. (Community Edition)"
|
|
1272
1265
|
},
|
|
1273
1266
|
components: {
|
|
1274
|
-
Input: async () => Promise.resolve().then(() => require("./Field-
|
|
1267
|
+
Input: async () => Promise.resolve().then(() => require("./Field-LK0YigdM.js")).then((module2) => ({
|
|
1275
1268
|
default: module2.Field
|
|
1276
1269
|
}))
|
|
1277
1270
|
},
|
package/dist/admin/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
require("yup");
|
|
4
|
-
const index = require("../_chunks/index-
|
|
4
|
+
const index = require("../_chunks/index-BmYyqc_l.js");
|
|
5
5
|
require("ckeditor5");
|
|
6
6
|
require("sanitize-html");
|
|
7
7
|
exports.StrapiMediaLib = index.StrapiMediaLib;
|
package/dist/admin/index.mjs
CHANGED
package/dist/server/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const name = "@_sh/strapi-plugin-ckeditor";
|
|
3
|
-
const version = "
|
|
3
|
+
const version = "7.0.0";
|
|
4
4
|
const description = "Integrates CKEditor 5 into your Strapi project as a fully customizable custom field. (Community Edition)";
|
|
5
5
|
const keywords = [
|
|
6
6
|
"strapi",
|
|
@@ -61,43 +61,45 @@ const scripts = {
|
|
|
61
61
|
"test:ts:front": "run -T tsc -p admin/tsconfig.json",
|
|
62
62
|
"test:ts:back": "run -T tsc -p server/tsconfig.json",
|
|
63
63
|
release: "release-it",
|
|
64
|
-
"release:info": "release-it --changelog"
|
|
64
|
+
"release:info": "release-it --changelog",
|
|
65
|
+
"lint:ts": "eslint . --ext ts,tsx --report-unused-disable-directives",
|
|
66
|
+
"lint:ts:fix": "eslint . --ext ts,tsx --report-unused-disable-directives --fix"
|
|
65
67
|
};
|
|
66
68
|
const dependencies = {
|
|
67
|
-
"@ckeditor/ckeditor5-react": "~
|
|
68
|
-
"@strapi/design-system": "2.
|
|
69
|
-
"@strapi/icons": "2.
|
|
70
|
-
ckeditor5: "~
|
|
69
|
+
"@ckeditor/ckeditor5-react": "~11.0.1",
|
|
70
|
+
"@strapi/design-system": "2.1.2",
|
|
71
|
+
"@strapi/icons": "2.1.2",
|
|
72
|
+
ckeditor5: "~47.4.0",
|
|
71
73
|
lodash: "4.17.21",
|
|
72
74
|
"sanitize-html": "2.13.0",
|
|
73
75
|
yup: "0.32.9"
|
|
74
76
|
};
|
|
75
77
|
const devDependencies = {
|
|
76
78
|
"@release-it/conventional-changelog": "10.0.0",
|
|
77
|
-
"@strapi/sdk-plugin": "5.
|
|
78
|
-
"@strapi/strapi": "5.
|
|
79
|
-
"@strapi/typescript-utils": "5.
|
|
80
|
-
"@types/react": "^18.
|
|
81
|
-
"@types/react-dom": "^18.
|
|
82
|
-
"@types/sanitize-html": "2.13.0",
|
|
83
|
-
"@typescript-eslint/eslint-plugin": "7.0.0",
|
|
84
|
-
"@typescript-eslint/parser": "7.0.0",
|
|
85
|
-
eslint: "8.2.0",
|
|
86
|
-
"eslint-config-airbnb": "19.0.4",
|
|
87
|
-
"eslint-config-airbnb-typescript": "18.0.0",
|
|
88
|
-
"eslint-config-prettier": "9.1.0",
|
|
89
|
-
"eslint-plugin-import": "2.25.3",
|
|
90
|
-
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
91
|
-
"eslint-plugin-prettier": "5.2.1",
|
|
92
|
-
"eslint-plugin-react": "7.28.0",
|
|
93
|
-
"eslint-plugin-react-hooks": "4.3.0",
|
|
94
|
-
prettier: "3.4.0",
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
|
|
79
|
+
"@strapi/sdk-plugin": "5.4.0",
|
|
80
|
+
"@strapi/strapi": "5.33.4",
|
|
81
|
+
"@strapi/typescript-utils": "5.33.4",
|
|
82
|
+
"@types/react": "^18.0.0",
|
|
83
|
+
"@types/react-dom": "^18.0.0",
|
|
84
|
+
"@types/sanitize-html": "^2.13.0",
|
|
85
|
+
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
|
86
|
+
"@typescript-eslint/parser": "^7.0.0",
|
|
87
|
+
eslint: "^8.2.0",
|
|
88
|
+
"eslint-config-airbnb": "^19.0.4",
|
|
89
|
+
"eslint-config-airbnb-typescript": "^18.0.0",
|
|
90
|
+
"eslint-config-prettier": "^9.1.0",
|
|
91
|
+
"eslint-plugin-import": "^2.25.3",
|
|
92
|
+
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
93
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
94
|
+
"eslint-plugin-react": "^7.28.0",
|
|
95
|
+
"eslint-plugin-react-hooks": "^4.3.0",
|
|
96
|
+
prettier: "^3.4.0",
|
|
97
|
+
"release-it": "^18.1.2",
|
|
98
|
+
typescript: "5.6.3",
|
|
99
|
+
react: "^18.0.0",
|
|
100
|
+
"react-dom": "^18.0.0",
|
|
101
|
+
"react-router-dom": "^6.0.0",
|
|
102
|
+
"styled-components": "^6.0.0"
|
|
101
103
|
};
|
|
102
104
|
const peerDependencies = {
|
|
103
105
|
"@strapi/strapi": "^5.0.0",
|
|
@@ -107,7 +109,7 @@ const peerDependencies = {
|
|
|
107
109
|
"styled-components": "^6.0.0"
|
|
108
110
|
};
|
|
109
111
|
const engines = {
|
|
110
|
-
node: ">=
|
|
112
|
+
node: ">=20.0.0 <=24.x.x",
|
|
111
113
|
npm: ">=6.0.0"
|
|
112
114
|
};
|
|
113
115
|
const license = "MIT";
|