@_sh/strapi-plugin-ckeditor 7.0.0 → 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/dist/_chunks/{Field-SB2kmV75.mjs → Field-C2N3FIDl.mjs} +1 -1
- package/dist/_chunks/{Field-D_sK_Mfq.js → Field-LK0YigdM.js} +1 -1
- package/dist/_chunks/{index-D6brYb_3.mjs → index-Be7yVVtW.mjs} +164 -147
- package/dist/_chunks/{index-V5z1nLLU.js → index-BmYyqc_l.js} +165 -148
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ import { useStrapiApp, useField } from "@strapi/strapi/admin";
|
|
|
6
6
|
import { ClassicEditor } from "ckeditor5";
|
|
7
7
|
import { CKEditor } from "@ckeditor/ckeditor5-react";
|
|
8
8
|
import "ckeditor5/ckeditor5.css";
|
|
9
|
-
import { g as getPluginConfig, p as prefixFileUrlWithBackendUrl, i as isImageResponsive } from "./index-
|
|
9
|
+
import { g as getPluginConfig, p as prefixFileUrlWithBackendUrl, i as isImageResponsive } from "./index-Be7yVVtW.mjs";
|
|
10
10
|
import "sanitize-html";
|
|
11
11
|
import { Collapse, Expand } from "@strapi/icons";
|
|
12
12
|
const STORAGE_KEYS = {
|
|
@@ -30,7 +30,7 @@ const admin = require("@strapi/strapi/admin");
|
|
|
30
30
|
const ckeditor5 = require("ckeditor5");
|
|
31
31
|
const ckeditor5React = require("@ckeditor/ckeditor5-react");
|
|
32
32
|
require("ckeditor5/ckeditor5.css");
|
|
33
|
-
const index = require("./index-
|
|
33
|
+
const index = require("./index-BmYyqc_l.js");
|
|
34
34
|
require("sanitize-html");
|
|
35
35
|
const icons = require("@strapi/icons");
|
|
36
36
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
@@ -1,152 +1,10 @@
|
|
|
1
1
|
import * as yup from "yup";
|
|
2
|
+
import cloneDeep from "lodash/cloneDeep";
|
|
2
3
|
import { css, styled } from "styled-components";
|
|
3
4
|
import { Plugin, ButtonView, FileRepository, logWarning, Alignment, Autoformat, AutoImage, BalloonToolbar, BlockQuote, Bold, Code, CodeBlock, Essentials, FontBackgroundColor, FontColor, FontFamily, FontSize, GeneralHtmlSupport, Heading, HorizontalLine, HtmlEmbed, Image, ImageCaption, ImageInsert, ImageResize, ImageStyle, ImageToolbar, ImageUpload, Indent, IndentBlock, Italic, List, ListProperties, Link, LinkImage, MediaEmbed, Paragraph, PageBreak, PasteFromOffice, PictureEditing, RemoveFormat, SourceEditing, SpecialCharacters, SpecialCharactersEssentials, Strikethrough, Style, Subscript, Superscript, ShowBlocks, Table, TableCaption, TableCellProperties, TableColumnResize, TableProperties, TableToolbar, TodoList, Underline, WordCount, IconIndent, Markdown, TextTransformation } from "ckeditor5";
|
|
4
5
|
import * as sanitizeHtml from "sanitize-html";
|
|
5
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
7
|
import { Flex, lightTheme } from "@strapi/design-system";
|
|
7
|
-
import cloneDeep from "lodash/cloneDeep";
|
|
8
|
-
const name = "@_sh/strapi-plugin-ckeditor";
|
|
9
|
-
const version = "7.0.0";
|
|
10
|
-
const description = "Integrates CKEditor 5 into your Strapi project as a fully customizable custom field. (Community Edition)";
|
|
11
|
-
const keywords = [
|
|
12
|
-
"strapi",
|
|
13
|
-
"ckeditor",
|
|
14
|
-
"ckeditor5",
|
|
15
|
-
"ckeditor 5",
|
|
16
|
-
"wysiwyg",
|
|
17
|
-
"rich text",
|
|
18
|
-
"editor"
|
|
19
|
-
];
|
|
20
|
-
const author = {
|
|
21
|
-
name: "nshenderov"
|
|
22
|
-
};
|
|
23
|
-
const homepage = "https://market.strapi.io/plugins/@_sh-strapi-plugin-ckeditor";
|
|
24
|
-
const repository = {
|
|
25
|
-
type: "git",
|
|
26
|
-
url: "https://github.com/nshenderov/strapi-plugin-ckeditor.git"
|
|
27
|
-
};
|
|
28
|
-
const strapi = {
|
|
29
|
-
name: "ckeditor5",
|
|
30
|
-
displayName: "CKEditor 5",
|
|
31
|
-
description: "Integrates CKEditor 5 into your Strapi project as a fully customizable custom field. (Community Edition)",
|
|
32
|
-
kind: "plugin"
|
|
33
|
-
};
|
|
34
|
-
const type = "commonjs";
|
|
35
|
-
const exports = {
|
|
36
|
-
"./package.json": "./package.json",
|
|
37
|
-
".": {
|
|
38
|
-
types: "./dist/admin/src/index.d.ts",
|
|
39
|
-
source: "./admin/src/index.ts",
|
|
40
|
-
"import": "./dist/admin/index.mjs",
|
|
41
|
-
require: "./dist/admin/index.js",
|
|
42
|
-
"default": "./dist/admin/index.js"
|
|
43
|
-
},
|
|
44
|
-
"./strapi-admin": {
|
|
45
|
-
types: "./dist/admin/src/index.d.ts",
|
|
46
|
-
source: "./admin/src/index.ts",
|
|
47
|
-
"import": "./dist/admin/index.mjs",
|
|
48
|
-
require: "./dist/admin/index.js",
|
|
49
|
-
"default": "./dist/admin/index.js"
|
|
50
|
-
},
|
|
51
|
-
"./strapi-server": {
|
|
52
|
-
types: "./dist/server/src/index.d.ts",
|
|
53
|
-
source: "./server/src/index.ts",
|
|
54
|
-
"import": "./dist/server/index.mjs",
|
|
55
|
-
require: "./dist/server/index.js",
|
|
56
|
-
"default": "./dist/server/index.js"
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
const files = [
|
|
60
|
-
"dist"
|
|
61
|
-
];
|
|
62
|
-
const scripts = {
|
|
63
|
-
build: "strapi-plugin build",
|
|
64
|
-
watch: "strapi-plugin watch",
|
|
65
|
-
"watch:link": "strapi-plugin watch:link",
|
|
66
|
-
verify: "strapi-plugin verify",
|
|
67
|
-
"test:ts:front": "run -T tsc -p admin/tsconfig.json",
|
|
68
|
-
"test:ts:back": "run -T tsc -p server/tsconfig.json",
|
|
69
|
-
release: "release-it",
|
|
70
|
-
"release:info": "release-it --changelog",
|
|
71
|
-
"lint:ts": "eslint . --ext ts,tsx --report-unused-disable-directives",
|
|
72
|
-
"lint:ts:fix": "eslint . --ext ts,tsx --report-unused-disable-directives --fix"
|
|
73
|
-
};
|
|
74
|
-
const dependencies = {
|
|
75
|
-
"@ckeditor/ckeditor5-react": "~11.0.1",
|
|
76
|
-
"@strapi/design-system": "2.1.2",
|
|
77
|
-
"@strapi/icons": "2.1.2",
|
|
78
|
-
ckeditor5: "~47.4.0",
|
|
79
|
-
lodash: "4.17.21",
|
|
80
|
-
"sanitize-html": "2.13.0",
|
|
81
|
-
yup: "0.32.9"
|
|
82
|
-
};
|
|
83
|
-
const devDependencies = {
|
|
84
|
-
"@release-it/conventional-changelog": "10.0.0",
|
|
85
|
-
"@strapi/sdk-plugin": "5.4.0",
|
|
86
|
-
"@strapi/strapi": "5.33.4",
|
|
87
|
-
"@strapi/typescript-utils": "5.33.4",
|
|
88
|
-
"@types/react": "^18.0.0",
|
|
89
|
-
"@types/react-dom": "^18.0.0",
|
|
90
|
-
"@types/sanitize-html": "^2.13.0",
|
|
91
|
-
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
|
92
|
-
"@typescript-eslint/parser": "^7.0.0",
|
|
93
|
-
eslint: "^8.2.0",
|
|
94
|
-
"eslint-config-airbnb": "^19.0.4",
|
|
95
|
-
"eslint-config-airbnb-typescript": "^18.0.0",
|
|
96
|
-
"eslint-config-prettier": "^9.1.0",
|
|
97
|
-
"eslint-plugin-import": "^2.25.3",
|
|
98
|
-
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
99
|
-
"eslint-plugin-prettier": "^5.2.1",
|
|
100
|
-
"eslint-plugin-react": "^7.28.0",
|
|
101
|
-
"eslint-plugin-react-hooks": "^4.3.0",
|
|
102
|
-
prettier: "^3.4.0",
|
|
103
|
-
"release-it": "^18.1.2",
|
|
104
|
-
typescript: "5.6.3",
|
|
105
|
-
react: "^18.0.0",
|
|
106
|
-
"react-dom": "^18.0.0",
|
|
107
|
-
"react-router-dom": "^6.0.0",
|
|
108
|
-
"styled-components": "^6.0.0"
|
|
109
|
-
};
|
|
110
|
-
const peerDependencies = {
|
|
111
|
-
"@strapi/strapi": "^5.0.0",
|
|
112
|
-
react: "^18.0.0",
|
|
113
|
-
"react-dom": "^18.0.0",
|
|
114
|
-
"react-router-dom": "^6.0.0",
|
|
115
|
-
"styled-components": "^6.0.0"
|
|
116
|
-
};
|
|
117
|
-
const engines = {
|
|
118
|
-
node: ">=20.0.0 <=24.x.x",
|
|
119
|
-
npm: ">=6.0.0"
|
|
120
|
-
};
|
|
121
|
-
const license = "MIT";
|
|
122
|
-
const pluginPkg = {
|
|
123
|
-
name,
|
|
124
|
-
version,
|
|
125
|
-
description,
|
|
126
|
-
keywords,
|
|
127
|
-
author,
|
|
128
|
-
homepage,
|
|
129
|
-
repository,
|
|
130
|
-
strapi,
|
|
131
|
-
type,
|
|
132
|
-
exports,
|
|
133
|
-
files,
|
|
134
|
-
scripts,
|
|
135
|
-
dependencies,
|
|
136
|
-
devDependencies,
|
|
137
|
-
peerDependencies,
|
|
138
|
-
engines,
|
|
139
|
-
license
|
|
140
|
-
};
|
|
141
|
-
const PLUGIN_ID = pluginPkg.strapi.name;
|
|
142
|
-
function isImageResponsive(imgFormats) {
|
|
143
|
-
const formats = Object.keys(imgFormats);
|
|
144
|
-
const isResponsive = !(formats.length === 1 && formats[0] === "thumbnail");
|
|
145
|
-
return isResponsive;
|
|
146
|
-
}
|
|
147
|
-
function prefixFileUrlWithBackendUrl(fileURL) {
|
|
148
|
-
return !!fileURL && fileURL.startsWith("/") ? `${window.strapi.backendURL}${fileURL}` : fileURL;
|
|
149
|
-
}
|
|
150
8
|
const colors = css`
|
|
151
9
|
${({ theme }) => css`
|
|
152
10
|
:root {
|
|
@@ -610,6 +468,148 @@ class StrapiMediaLib extends Plugin {
|
|
|
610
468
|
this.strapiToggle();
|
|
611
469
|
}
|
|
612
470
|
}
|
|
471
|
+
const name = "@_sh/strapi-plugin-ckeditor";
|
|
472
|
+
const version = "7.0.0";
|
|
473
|
+
const description = "Integrates CKEditor 5 into your Strapi project as a fully customizable custom field. (Community Edition)";
|
|
474
|
+
const keywords = [
|
|
475
|
+
"strapi",
|
|
476
|
+
"ckeditor",
|
|
477
|
+
"ckeditor5",
|
|
478
|
+
"ckeditor 5",
|
|
479
|
+
"wysiwyg",
|
|
480
|
+
"rich text",
|
|
481
|
+
"editor"
|
|
482
|
+
];
|
|
483
|
+
const author = {
|
|
484
|
+
name: "nshenderov"
|
|
485
|
+
};
|
|
486
|
+
const homepage = "https://market.strapi.io/plugins/@_sh-strapi-plugin-ckeditor";
|
|
487
|
+
const repository = {
|
|
488
|
+
type: "git",
|
|
489
|
+
url: "https://github.com/nshenderov/strapi-plugin-ckeditor.git"
|
|
490
|
+
};
|
|
491
|
+
const strapi = {
|
|
492
|
+
name: "ckeditor5",
|
|
493
|
+
displayName: "CKEditor 5",
|
|
494
|
+
description: "Integrates CKEditor 5 into your Strapi project as a fully customizable custom field. (Community Edition)",
|
|
495
|
+
kind: "plugin"
|
|
496
|
+
};
|
|
497
|
+
const type = "commonjs";
|
|
498
|
+
const exports$1 = {
|
|
499
|
+
"./package.json": "./package.json",
|
|
500
|
+
".": {
|
|
501
|
+
types: "./dist/admin/src/index.d.ts",
|
|
502
|
+
source: "./admin/src/index.ts",
|
|
503
|
+
"import": "./dist/admin/index.mjs",
|
|
504
|
+
require: "./dist/admin/index.js",
|
|
505
|
+
"default": "./dist/admin/index.js"
|
|
506
|
+
},
|
|
507
|
+
"./strapi-admin": {
|
|
508
|
+
types: "./dist/admin/src/index.d.ts",
|
|
509
|
+
source: "./admin/src/index.ts",
|
|
510
|
+
"import": "./dist/admin/index.mjs",
|
|
511
|
+
require: "./dist/admin/index.js",
|
|
512
|
+
"default": "./dist/admin/index.js"
|
|
513
|
+
},
|
|
514
|
+
"./strapi-server": {
|
|
515
|
+
types: "./dist/server/src/index.d.ts",
|
|
516
|
+
source: "./server/src/index.ts",
|
|
517
|
+
"import": "./dist/server/index.mjs",
|
|
518
|
+
require: "./dist/server/index.js",
|
|
519
|
+
"default": "./dist/server/index.js"
|
|
520
|
+
}
|
|
521
|
+
};
|
|
522
|
+
const files = [
|
|
523
|
+
"dist"
|
|
524
|
+
];
|
|
525
|
+
const scripts = {
|
|
526
|
+
build: "strapi-plugin build",
|
|
527
|
+
watch: "strapi-plugin watch",
|
|
528
|
+
"watch:link": "strapi-plugin watch:link",
|
|
529
|
+
verify: "strapi-plugin verify",
|
|
530
|
+
"test:ts:front": "run -T tsc -p admin/tsconfig.json",
|
|
531
|
+
"test:ts:back": "run -T tsc -p server/tsconfig.json",
|
|
532
|
+
release: "release-it",
|
|
533
|
+
"release:info": "release-it --changelog",
|
|
534
|
+
"lint:ts": "eslint . --ext ts,tsx --report-unused-disable-directives",
|
|
535
|
+
"lint:ts:fix": "eslint . --ext ts,tsx --report-unused-disable-directives --fix"
|
|
536
|
+
};
|
|
537
|
+
const dependencies = {
|
|
538
|
+
"@ckeditor/ckeditor5-react": "~11.0.1",
|
|
539
|
+
"@strapi/design-system": "2.1.2",
|
|
540
|
+
"@strapi/icons": "2.1.2",
|
|
541
|
+
ckeditor5: "~47.4.0",
|
|
542
|
+
lodash: "4.17.21",
|
|
543
|
+
"sanitize-html": "2.13.0",
|
|
544
|
+
yup: "0.32.9"
|
|
545
|
+
};
|
|
546
|
+
const devDependencies = {
|
|
547
|
+
"@release-it/conventional-changelog": "10.0.0",
|
|
548
|
+
"@strapi/sdk-plugin": "5.4.0",
|
|
549
|
+
"@strapi/strapi": "5.33.4",
|
|
550
|
+
"@strapi/typescript-utils": "5.33.4",
|
|
551
|
+
"@types/react": "^18.0.0",
|
|
552
|
+
"@types/react-dom": "^18.0.0",
|
|
553
|
+
"@types/sanitize-html": "^2.13.0",
|
|
554
|
+
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
|
555
|
+
"@typescript-eslint/parser": "^7.0.0",
|
|
556
|
+
eslint: "^8.2.0",
|
|
557
|
+
"eslint-config-airbnb": "^19.0.4",
|
|
558
|
+
"eslint-config-airbnb-typescript": "^18.0.0",
|
|
559
|
+
"eslint-config-prettier": "^9.1.0",
|
|
560
|
+
"eslint-plugin-import": "^2.25.3",
|
|
561
|
+
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
562
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
563
|
+
"eslint-plugin-react": "^7.28.0",
|
|
564
|
+
"eslint-plugin-react-hooks": "^4.3.0",
|
|
565
|
+
prettier: "^3.4.0",
|
|
566
|
+
"release-it": "^18.1.2",
|
|
567
|
+
typescript: "5.6.3",
|
|
568
|
+
react: "^18.0.0",
|
|
569
|
+
"react-dom": "^18.0.0",
|
|
570
|
+
"react-router-dom": "^6.0.0",
|
|
571
|
+
"styled-components": "^6.0.0"
|
|
572
|
+
};
|
|
573
|
+
const peerDependencies = {
|
|
574
|
+
"@strapi/strapi": "^5.0.0",
|
|
575
|
+
react: "^18.0.0",
|
|
576
|
+
"react-dom": "^18.0.0",
|
|
577
|
+
"react-router-dom": "^6.0.0",
|
|
578
|
+
"styled-components": "^6.0.0"
|
|
579
|
+
};
|
|
580
|
+
const engines = {
|
|
581
|
+
node: ">=20.0.0 <=24.x.x",
|
|
582
|
+
npm: ">=6.0.0"
|
|
583
|
+
};
|
|
584
|
+
const license = "MIT";
|
|
585
|
+
const pluginPkg = {
|
|
586
|
+
name,
|
|
587
|
+
version,
|
|
588
|
+
description,
|
|
589
|
+
keywords,
|
|
590
|
+
author,
|
|
591
|
+
homepage,
|
|
592
|
+
repository,
|
|
593
|
+
strapi,
|
|
594
|
+
type,
|
|
595
|
+
exports: exports$1,
|
|
596
|
+
files,
|
|
597
|
+
scripts,
|
|
598
|
+
dependencies,
|
|
599
|
+
devDependencies,
|
|
600
|
+
peerDependencies,
|
|
601
|
+
engines,
|
|
602
|
+
license
|
|
603
|
+
};
|
|
604
|
+
const PLUGIN_ID = pluginPkg.strapi.name;
|
|
605
|
+
function isImageResponsive(imgFormats) {
|
|
606
|
+
const formats = Object.keys(imgFormats);
|
|
607
|
+
const isResponsive = !(formats.length === 1 && formats[0] === "thumbnail");
|
|
608
|
+
return isResponsive;
|
|
609
|
+
}
|
|
610
|
+
function prefixFileUrlWithBackendUrl(fileURL) {
|
|
611
|
+
return !!fileURL && fileURL.startsWith("/") ? `${window.strapi.backendURL}${fileURL}` : fileURL;
|
|
612
|
+
}
|
|
613
613
|
class StrapiUploadAdapter extends Plugin {
|
|
614
614
|
static get requires() {
|
|
615
615
|
return [FileRepository];
|
|
@@ -1161,6 +1161,20 @@ function getPluginTheme() {
|
|
|
1161
1161
|
function getPluginConfig() {
|
|
1162
1162
|
return PLUGIN_CONFIG;
|
|
1163
1163
|
}
|
|
1164
|
+
const clonedDefaultTheme = cloneDeep(defaultTheme);
|
|
1165
|
+
const clonedDefaultHtmlPreset = cloneDeep(defaultHtmlPreset);
|
|
1166
|
+
const clonedDefaultMarkdownPreset = cloneDeep(defaultMarkdownPreset);
|
|
1167
|
+
const exports = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1168
|
+
__proto__: null,
|
|
1169
|
+
StrapiMediaLib,
|
|
1170
|
+
StrapiUploadAdapter,
|
|
1171
|
+
defaultHtmlPreset: clonedDefaultHtmlPreset,
|
|
1172
|
+
defaultMarkdownPreset: clonedDefaultMarkdownPreset,
|
|
1173
|
+
defaultTheme: clonedDefaultTheme,
|
|
1174
|
+
getPluginPresets,
|
|
1175
|
+
getPluginTheme,
|
|
1176
|
+
setPluginConfig
|
|
1177
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
1164
1178
|
function CKEditorIcon() {
|
|
1165
1179
|
return /* @__PURE__ */ jsx(IconBox, { justifyContent: "center", alignItems: "center", width: 7, height: 6, hasRadius: true, "aria-hidden": true, children: /* @__PURE__ */ jsx(SvgIcon, {}) });
|
|
1166
1180
|
}
|
|
@@ -1186,9 +1200,6 @@ const IconBox = styled(Flex)`
|
|
|
1186
1200
|
background-color: ${lightTheme.colors.secondary100};
|
|
1187
1201
|
border: 1px solid ${lightTheme.colors.secondary200};
|
|
1188
1202
|
`;
|
|
1189
|
-
const clonedDefaultTheme = cloneDeep(defaultTheme);
|
|
1190
|
-
const clonedDefaultHtmlPreset = cloneDeep(defaultHtmlPreset);
|
|
1191
|
-
const clonedDefaultMarkdownPreset = cloneDeep(defaultMarkdownPreset);
|
|
1192
1203
|
const AVAILABLE_OPTIONS = [];
|
|
1193
1204
|
function fillAvailableOptions() {
|
|
1194
1205
|
const { presets } = getPluginConfig();
|
|
@@ -1211,6 +1222,12 @@ const index = {
|
|
|
1211
1222
|
fillAvailableOptions();
|
|
1212
1223
|
},
|
|
1213
1224
|
async register(app) {
|
|
1225
|
+
app.registerPlugin({
|
|
1226
|
+
id: PLUGIN_ID,
|
|
1227
|
+
isReady: true,
|
|
1228
|
+
name: "CKEditor",
|
|
1229
|
+
apis: exports
|
|
1230
|
+
});
|
|
1214
1231
|
app.customFields.register({
|
|
1215
1232
|
name: "CKEditor",
|
|
1216
1233
|
type: "richtext",
|
|
@@ -1225,7 +1242,7 @@ const index = {
|
|
|
1225
1242
|
defaultMessage: "The advanced rich text editor. (Community Edition)"
|
|
1226
1243
|
},
|
|
1227
1244
|
components: {
|
|
1228
|
-
Input: async () => import("./Field-
|
|
1245
|
+
Input: async () => import("./Field-C2N3FIDl.mjs").then((module) => ({
|
|
1229
1246
|
default: module.Field
|
|
1230
1247
|
}))
|
|
1231
1248
|
},
|
|
@@ -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,150 +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 = "7.0.0";
|
|
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
|
-
"lint:ts": "eslint . --ext ts,tsx --report-unused-disable-directives",
|
|
94
|
-
"lint:ts:fix": "eslint . --ext ts,tsx --report-unused-disable-directives --fix"
|
|
95
|
-
};
|
|
96
|
-
const dependencies = {
|
|
97
|
-
"@ckeditor/ckeditor5-react": "~11.0.1",
|
|
98
|
-
"@strapi/design-system": "2.1.2",
|
|
99
|
-
"@strapi/icons": "2.1.2",
|
|
100
|
-
ckeditor5: "~47.4.0",
|
|
101
|
-
lodash: "4.17.21",
|
|
102
|
-
"sanitize-html": "2.13.0",
|
|
103
|
-
yup: "0.32.9"
|
|
104
|
-
};
|
|
105
|
-
const devDependencies = {
|
|
106
|
-
"@release-it/conventional-changelog": "10.0.0",
|
|
107
|
-
"@strapi/sdk-plugin": "5.4.0",
|
|
108
|
-
"@strapi/strapi": "5.33.4",
|
|
109
|
-
"@strapi/typescript-utils": "5.33.4",
|
|
110
|
-
"@types/react": "^18.0.0",
|
|
111
|
-
"@types/react-dom": "^18.0.0",
|
|
112
|
-
"@types/sanitize-html": "^2.13.0",
|
|
113
|
-
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
|
114
|
-
"@typescript-eslint/parser": "^7.0.0",
|
|
115
|
-
eslint: "^8.2.0",
|
|
116
|
-
"eslint-config-airbnb": "^19.0.4",
|
|
117
|
-
"eslint-config-airbnb-typescript": "^18.0.0",
|
|
118
|
-
"eslint-config-prettier": "^9.1.0",
|
|
119
|
-
"eslint-plugin-import": "^2.25.3",
|
|
120
|
-
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
121
|
-
"eslint-plugin-prettier": "^5.2.1",
|
|
122
|
-
"eslint-plugin-react": "^7.28.0",
|
|
123
|
-
"eslint-plugin-react-hooks": "^4.3.0",
|
|
124
|
-
prettier: "^3.4.0",
|
|
125
|
-
"release-it": "^18.1.2",
|
|
126
|
-
typescript: "5.6.3",
|
|
127
|
-
react: "^18.0.0",
|
|
128
|
-
"react-dom": "^18.0.0",
|
|
129
|
-
"react-router-dom": "^6.0.0",
|
|
130
|
-
"styled-components": "^6.0.0"
|
|
131
|
-
};
|
|
132
|
-
const peerDependencies = {
|
|
133
|
-
"@strapi/strapi": "^5.0.0",
|
|
134
|
-
react: "^18.0.0",
|
|
135
|
-
"react-dom": "^18.0.0",
|
|
136
|
-
"react-router-dom": "^6.0.0",
|
|
137
|
-
"styled-components": "^6.0.0"
|
|
138
|
-
};
|
|
139
|
-
const engines = {
|
|
140
|
-
node: ">=20.0.0 <=24.x.x",
|
|
141
|
-
npm: ">=6.0.0"
|
|
142
|
-
};
|
|
143
|
-
const license = "MIT";
|
|
144
|
-
const pluginPkg = {
|
|
145
|
-
name,
|
|
146
|
-
version,
|
|
147
|
-
description,
|
|
148
|
-
keywords,
|
|
149
|
-
author,
|
|
150
|
-
homepage,
|
|
151
|
-
repository,
|
|
152
|
-
strapi,
|
|
153
|
-
type,
|
|
154
|
-
exports: exports$1,
|
|
155
|
-
files,
|
|
156
|
-
scripts,
|
|
157
|
-
dependencies,
|
|
158
|
-
devDependencies,
|
|
159
|
-
peerDependencies,
|
|
160
|
-
engines,
|
|
161
|
-
license
|
|
162
|
-
};
|
|
163
|
-
const PLUGIN_ID = pluginPkg.strapi.name;
|
|
164
|
-
function isImageResponsive(imgFormats) {
|
|
165
|
-
const formats = Object.keys(imgFormats);
|
|
166
|
-
const isResponsive = !(formats.length === 1 && formats[0] === "thumbnail");
|
|
167
|
-
return isResponsive;
|
|
168
|
-
}
|
|
169
|
-
function prefixFileUrlWithBackendUrl(fileURL) {
|
|
170
|
-
return !!fileURL && fileURL.startsWith("/") ? `${window.strapi.backendURL}${fileURL}` : fileURL;
|
|
171
|
-
}
|
|
29
|
+
const sanitizeHtml__namespace = /* @__PURE__ */ _interopNamespace(sanitizeHtml);
|
|
172
30
|
const colors = styledComponents.css`
|
|
173
31
|
${({ theme }) => styledComponents.css`
|
|
174
32
|
:root {
|
|
@@ -632,6 +490,148 @@ class StrapiMediaLib extends ckeditor5.Plugin {
|
|
|
632
490
|
this.strapiToggle();
|
|
633
491
|
}
|
|
634
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
|
+
}
|
|
635
635
|
class StrapiUploadAdapter extends ckeditor5.Plugin {
|
|
636
636
|
static get requires() {
|
|
637
637
|
return [ckeditor5.FileRepository];
|
|
@@ -1183,6 +1183,20 @@ function getPluginTheme() {
|
|
|
1183
1183
|
function getPluginConfig() {
|
|
1184
1184
|
return PLUGIN_CONFIG;
|
|
1185
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" }));
|
|
1186
1200
|
function CKEditorIcon() {
|
|
1187
1201
|
return /* @__PURE__ */ jsxRuntime.jsx(IconBox, { justifyContent: "center", alignItems: "center", width: 7, height: 6, hasRadius: true, "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx(SvgIcon, {}) });
|
|
1188
1202
|
}
|
|
@@ -1208,9 +1222,6 @@ const IconBox = styledComponents.styled(designSystem.Flex)`
|
|
|
1208
1222
|
background-color: ${designSystem.lightTheme.colors.secondary100};
|
|
1209
1223
|
border: 1px solid ${designSystem.lightTheme.colors.secondary200};
|
|
1210
1224
|
`;
|
|
1211
|
-
const clonedDefaultTheme = cloneDeep__default.default(defaultTheme);
|
|
1212
|
-
const clonedDefaultHtmlPreset = cloneDeep__default.default(defaultHtmlPreset);
|
|
1213
|
-
const clonedDefaultMarkdownPreset = cloneDeep__default.default(defaultMarkdownPreset);
|
|
1214
1225
|
const AVAILABLE_OPTIONS = [];
|
|
1215
1226
|
function fillAvailableOptions() {
|
|
1216
1227
|
const { presets } = getPluginConfig();
|
|
@@ -1233,6 +1244,12 @@ const index = {
|
|
|
1233
1244
|
fillAvailableOptions();
|
|
1234
1245
|
},
|
|
1235
1246
|
async register(app) {
|
|
1247
|
+
app.registerPlugin({
|
|
1248
|
+
id: PLUGIN_ID,
|
|
1249
|
+
isReady: true,
|
|
1250
|
+
name: "CKEditor",
|
|
1251
|
+
apis: exports$1
|
|
1252
|
+
});
|
|
1236
1253
|
app.customFields.register({
|
|
1237
1254
|
name: "CKEditor",
|
|
1238
1255
|
type: "richtext",
|
|
@@ -1247,7 +1264,7 @@ const index = {
|
|
|
1247
1264
|
defaultMessage: "The advanced rich text editor. (Community Edition)"
|
|
1248
1265
|
},
|
|
1249
1266
|
components: {
|
|
1250
|
-
Input: async () => Promise.resolve().then(() => require("./Field-
|
|
1267
|
+
Input: async () => Promise.resolve().then(() => require("./Field-LK0YigdM.js")).then((module2) => ({
|
|
1251
1268
|
default: module2.Field
|
|
1252
1269
|
}))
|
|
1253
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/package.json
CHANGED