@_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
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ require("react");
3
+ const index = require("../_chunks/index-BOIHTrHJ.js");
4
+ module.exports = index.index;
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -0,0 +1,6 @@
1
+ import "react";
2
+ import { i } from "../_chunks/index-G6Uc7lRl.mjs";
3
+ export {
4
+ i as default
5
+ };
6
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
@@ -0,0 +1,183 @@
1
+ "use strict";
2
+ const require$$0$1 = require("fs");
3
+ const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
4
+ const require$$0__default = /* @__PURE__ */ _interopDefault(require$$0$1);
5
+ function getDefaultExportFromCjs(x) {
6
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
7
+ }
8
+ const name = "@_sh/strapi-plugin-ckeditor";
9
+ const version = "4.0.0";
10
+ const description = "Integrates CKEditor 5 into your Strapi project as a fully customizable custom field. (Unofficial integration)";
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$1 = {
29
+ name: "ckeditor5",
30
+ displayName: "CKEditor 5",
31
+ description: "Integrates CKEditor 5 into your Strapi project as a fully customizable custom field. (Unofficial integration)",
32
+ kind: "plugin"
33
+ };
34
+ const exports$1 = {
35
+ "./package.json": "./package.json",
36
+ "./strapi-admin": {
37
+ source: "./admin/src/index.js",
38
+ "import": "./dist/admin/index.mjs",
39
+ require: "./dist/admin/index.js",
40
+ "default": "./dist/admin/index.js"
41
+ },
42
+ "./strapi-server": {
43
+ source: "./server/src/index.js",
44
+ "import": "./dist/server/index.mjs",
45
+ require: "./dist/server/index.js",
46
+ "default": "./dist/server/index.js"
47
+ }
48
+ };
49
+ const files = [
50
+ "dist",
51
+ "./strapi-server.js"
52
+ ];
53
+ const scripts = {
54
+ build: "strapi-plugin build",
55
+ watch: "strapi-plugin watch",
56
+ "watch:link": "strapi-plugin watch:link",
57
+ verify: "strapi-plugin verify",
58
+ release: "release-it",
59
+ "release:info": "release-it --changelog"
60
+ };
61
+ const dependencies = {
62
+ ckeditor5: "^43.1.0",
63
+ "@ckeditor/ckeditor5-react": "^9.1.0",
64
+ "@strapi/design-system": "^2.0.0-rc.11",
65
+ "prop-types": "^15.8.1",
66
+ "sanitize-html": "^2.13.0"
67
+ };
68
+ const devDependencies = {
69
+ "@strapi/strapi": "^5.0.0",
70
+ "@strapi/sdk-plugin": "^5.2.6",
71
+ prettier: "^3.3.3",
72
+ react: "^18.3.1",
73
+ "react-dom": "^18.3.1",
74
+ "react-router-dom": "^6.26.2",
75
+ "styled-components": "^6.1.13",
76
+ "release-it": "^17.6.0",
77
+ "@release-it/conventional-changelog": "^8.0.1"
78
+ };
79
+ const peerDependencies = {
80
+ "@strapi/strapi": "^5.0.0",
81
+ "@strapi/sdk-plugin": "^5.2.6",
82
+ react: "^18.3.1",
83
+ "react-dom": "^18.3.1",
84
+ "react-router-dom": "^6.26.2",
85
+ "styled-components": "^6.1.13"
86
+ };
87
+ const engines = {
88
+ node: ">=18.0.0 <=20.x.x",
89
+ npm: ">=6.0.0"
90
+ };
91
+ const license = "MIT";
92
+ const require$$0 = {
93
+ name,
94
+ version,
95
+ description,
96
+ "private": false,
97
+ keywords,
98
+ author,
99
+ homepage,
100
+ repository,
101
+ strapi: strapi$1,
102
+ exports: exports$1,
103
+ files,
104
+ scripts,
105
+ dependencies,
106
+ devDependencies,
107
+ peerDependencies,
108
+ engines,
109
+ license
110
+ };
111
+ const pluginPkg = require$$0;
112
+ var pluginId$2 = pluginPkg.strapi.name;
113
+ const pluginId$1 = pluginId$2;
114
+ var register$1 = ({ strapi: strapi2 }) => {
115
+ strapi2.customFields.register({
116
+ name: "CKEditor",
117
+ plugin: pluginId$1,
118
+ type: "richtext"
119
+ });
120
+ };
121
+ const pluginId = pluginId$2;
122
+ var config$3 = {
123
+ getConfig: async (ctx) => {
124
+ const { responsiveDimensions = false } = await strapi.plugin("upload").service("upload").getSettings();
125
+ const config2 = await strapi.plugin(pluginId).service("config").getConfig() + `
126
+ globalThis.SH_CKE_UPLOAD_ADAPTER_IS_RESPONSIVE = ${responsiveDimensions}`;
127
+ ctx.type = "application/javascript";
128
+ ctx.send(config2);
129
+ }
130
+ };
131
+ const config$2 = config$3;
132
+ var controllers$1 = {
133
+ config: config$2
134
+ };
135
+ var routes$1 = {
136
+ config: {
137
+ type: "admin",
138
+ routes: [
139
+ {
140
+ method: "GET",
141
+ path: "/config/ckeditor",
142
+ handler: "config.getConfig",
143
+ config: {
144
+ auth: false
145
+ }
146
+ }
147
+ ]
148
+ }
149
+ };
150
+ const fs = require$$0__default.default;
151
+ var config$1 = ({ strapi: strapi2 }) => {
152
+ return {
153
+ getConfig() {
154
+ const appDir = process.cwd();
155
+ const fileName = "ckeditor";
156
+ for (const ext of ["js", "ts"]) {
157
+ const filePath = `${appDir}/config/${fileName}.${ext}`;
158
+ if (fs.existsSync(filePath)) {
159
+ return fs.readFileSync(filePath, "utf8") + `
160
+ globalThis.SH_CKE_CONFIG = CKEConfig()`;
161
+ }
162
+ }
163
+ return `globalThis.SH_CKE_CONFIG = null`;
164
+ }
165
+ };
166
+ };
167
+ const config = config$1;
168
+ var services$1 = {
169
+ config
170
+ };
171
+ const register = register$1;
172
+ const controllers = controllers$1;
173
+ const routes = routes$1;
174
+ const services = services$1;
175
+ var src = {
176
+ register,
177
+ controllers,
178
+ routes,
179
+ services
180
+ };
181
+ const index = /* @__PURE__ */ getDefaultExportFromCjs(src);
182
+ module.exports = index;
183
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../server/src/utils/pluginId.js","../../server/src/register.js","../../server/src/controllers/config.js","../../server/src/controllers/index.js","../../server/src/routes/index.js","../../server/src/services/config.js","../../server/src/services/index.js","../../server/src/index.js"],"sourcesContent":["'use strict';\n\nconst pluginPkg = require('../../../package.json');\n\nmodule.exports =\n pluginPkg.strapi.name ||\n pluginPkg.name.replace(/^(@_sh\\/strapi-)plugin-/i, '');\n","'use strict';\n\nconst pluginId = require('./utils/pluginId');\n\nmodule.exports = ({ strapi }) => {\n strapi.customFields.register({\n name: 'CKEditor',\n plugin: pluginId,\n type: 'richtext',\n });\n};\n","'use strict';\n\nconst pluginId = require('../utils/pluginId');\n\nmodule.exports = {\n getConfig: async (ctx) => {\n const { responsiveDimensions = false } = await strapi\n .plugin('upload')\n .service('upload')\n .getSettings();\n\n const config =\n (await strapi.plugin(pluginId).service('config').getConfig()) +\n `\\nglobalThis.SH_CKE_UPLOAD_ADAPTER_IS_RESPONSIVE = ${responsiveDimensions}`;\n\n ctx.type = 'application/javascript';\n ctx.send(config);\n },\n};\n","'use strict';\n\nconst config = require('./config');\n\nmodule.exports = {\n config,\n};\n","module.exports = {\n config: {\n type: 'admin',\n routes: [\n {\n method: 'GET',\n path: '/config/ckeditor',\n handler: 'config.getConfig',\n config: {\n auth: false,\n },\n },\n ],\n },\n};\n","'use strict';\n\nconst fs = require('fs');\n\nmodule.exports = ({ strapi }) => {\n return {\n getConfig() {\n const appDir = process.cwd();\n\n const fileName = 'ckeditor';\n\n for (const ext of ['js', 'ts']) {\n const filePath = `${appDir}/config/${fileName}.${ext}`;\n if (fs.existsSync(filePath)) {\n return (\n fs.readFileSync(filePath, 'utf8') +\n `\\nglobalThis.SH_CKE_CONFIG = CKEConfig()`\n );\n }\n }\n\n return `globalThis.SH_CKE_CONFIG = null`;\n },\n };\n};\n","'use strict';\n\nconst config = require('./config');\n\nmodule.exports = {\n config,\n};\n","'use strict';\n\nconst register = require('./register');\nconst controllers = require('./controllers');\nconst routes = require('./routes');\nconst services = require('./services');\n\nmodule.exports = {\n register,\n controllers,\n routes,\n services\n};\n"],"names":["pluginId","require$$0","register","strapi","config","controllers","routes","services","require$$1","require$$2","require$$3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAAM,YAAY;IAElBA,aACE,UAAU,OAAO;ACHnB,MAAMA,aAAWC;AAEjB,IAAAC,aAAiB,CAAC,EAAE,QAAAC,cAAa;AAC/B,EAAAA,QAAO,aAAa,SAAS;AAAA,IAC3B,MAAM;AAAA,IACN,QAAQH;AAAAA,IACR,MAAM;AAAA,EACV,CA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 @@
1
+ import require$$0$1 from "fs";
2
+ function getDefaultExportFromCjs(x) {
3
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
4
+ }
5
+ const name = "@_sh/strapi-plugin-ckeditor";
6
+ const version = "4.0.0";
7
+ const description = "Integrates CKEditor 5 into your Strapi project as a fully customizable custom field. (Unofficial integration)";
8
+ const keywords = [
9
+ "strapi",
10
+ "ckeditor",
11
+ "ckeditor5",
12
+ "ckeditor 5",
13
+ "wysiwyg",
14
+ "rich text",
15
+ "editor"
16
+ ];
17
+ const author = {
18
+ name: "nshenderov"
19
+ };
20
+ const homepage = "https://market.strapi.io/plugins/@_sh-strapi-plugin-ckeditor";
21
+ const repository = {
22
+ type: "git",
23
+ url: "https://github.com/nshenderov/strapi-plugin-ckeditor.git"
24
+ };
25
+ const strapi$1 = {
26
+ name: "ckeditor5",
27
+ displayName: "CKEditor 5",
28
+ description: "Integrates CKEditor 5 into your Strapi project as a fully customizable custom field. (Unofficial integration)",
29
+ kind: "plugin"
30
+ };
31
+ const exports = {
32
+ "./package.json": "./package.json",
33
+ "./strapi-admin": {
34
+ source: "./admin/src/index.js",
35
+ "import": "./dist/admin/index.mjs",
36
+ require: "./dist/admin/index.js",
37
+ "default": "./dist/admin/index.js"
38
+ },
39
+ "./strapi-server": {
40
+ source: "./server/src/index.js",
41
+ "import": "./dist/server/index.mjs",
42
+ require: "./dist/server/index.js",
43
+ "default": "./dist/server/index.js"
44
+ }
45
+ };
46
+ const files = [
47
+ "dist",
48
+ "./strapi-server.js"
49
+ ];
50
+ const scripts = {
51
+ build: "strapi-plugin build",
52
+ watch: "strapi-plugin watch",
53
+ "watch:link": "strapi-plugin watch:link",
54
+ verify: "strapi-plugin verify",
55
+ release: "release-it",
56
+ "release:info": "release-it --changelog"
57
+ };
58
+ const dependencies = {
59
+ ckeditor5: "^43.1.0",
60
+ "@ckeditor/ckeditor5-react": "^9.1.0",
61
+ "@strapi/design-system": "^2.0.0-rc.11",
62
+ "prop-types": "^15.8.1",
63
+ "sanitize-html": "^2.13.0"
64
+ };
65
+ const devDependencies = {
66
+ "@strapi/strapi": "^5.0.0",
67
+ "@strapi/sdk-plugin": "^5.2.6",
68
+ prettier: "^3.3.3",
69
+ react: "^18.3.1",
70
+ "react-dom": "^18.3.1",
71
+ "react-router-dom": "^6.26.2",
72
+ "styled-components": "^6.1.13",
73
+ "release-it": "^17.6.0",
74
+ "@release-it/conventional-changelog": "^8.0.1"
75
+ };
76
+ const peerDependencies = {
77
+ "@strapi/strapi": "^5.0.0",
78
+ "@strapi/sdk-plugin": "^5.2.6",
79
+ react: "^18.3.1",
80
+ "react-dom": "^18.3.1",
81
+ "react-router-dom": "^6.26.2",
82
+ "styled-components": "^6.1.13"
83
+ };
84
+ const engines = {
85
+ node: ">=18.0.0 <=20.x.x",
86
+ npm: ">=6.0.0"
87
+ };
88
+ const license = "MIT";
89
+ const require$$0 = {
90
+ name,
91
+ version,
92
+ description,
93
+ "private": false,
94
+ keywords,
95
+ author,
96
+ homepage,
97
+ repository,
98
+ strapi: strapi$1,
99
+ exports,
100
+ files,
101
+ scripts,
102
+ dependencies,
103
+ devDependencies,
104
+ peerDependencies,
105
+ engines,
106
+ license
107
+ };
108
+ const pluginPkg = require$$0;
109
+ var pluginId$2 = pluginPkg.strapi.name;
110
+ const pluginId$1 = pluginId$2;
111
+ var register$1 = ({ strapi: strapi2 }) => {
112
+ strapi2.customFields.register({
113
+ name: "CKEditor",
114
+ plugin: pluginId$1,
115
+ type: "richtext"
116
+ });
117
+ };
118
+ const pluginId = pluginId$2;
119
+ var config$3 = {
120
+ getConfig: async (ctx) => {
121
+ const { responsiveDimensions = false } = await strapi.plugin("upload").service("upload").getSettings();
122
+ const config2 = await strapi.plugin(pluginId).service("config").getConfig() + `
123
+ globalThis.SH_CKE_UPLOAD_ADAPTER_IS_RESPONSIVE = ${responsiveDimensions}`;
124
+ ctx.type = "application/javascript";
125
+ ctx.send(config2);
126
+ }
127
+ };
128
+ const config$2 = config$3;
129
+ var controllers$1 = {
130
+ config: config$2
131
+ };
132
+ var routes$1 = {
133
+ config: {
134
+ type: "admin",
135
+ routes: [
136
+ {
137
+ method: "GET",
138
+ path: "/config/ckeditor",
139
+ handler: "config.getConfig",
140
+ config: {
141
+ auth: false
142
+ }
143
+ }
144
+ ]
145
+ }
146
+ };
147
+ const fs = require$$0$1;
148
+ var config$1 = ({ strapi: strapi2 }) => {
149
+ return {
150
+ getConfig() {
151
+ const appDir = process.cwd();
152
+ const fileName = "ckeditor";
153
+ for (const ext of ["js", "ts"]) {
154
+ const filePath = `${appDir}/config/${fileName}.${ext}`;
155
+ if (fs.existsSync(filePath)) {
156
+ return fs.readFileSync(filePath, "utf8") + `
157
+ globalThis.SH_CKE_CONFIG = CKEConfig()`;
158
+ }
159
+ }
160
+ return `globalThis.SH_CKE_CONFIG = null`;
161
+ }
162
+ };
163
+ };
164
+ const config = config$1;
165
+ var services$1 = {
166
+ config
167
+ };
168
+ const register = register$1;
169
+ const controllers = controllers$1;
170
+ const routes = routes$1;
171
+ const services = services$1;
172
+ var src = {
173
+ register,
174
+ controllers,
175
+ routes,
176
+ services
177
+ };
178
+ const index = /* @__PURE__ */ getDefaultExportFromCjs(src);
179
+ export {
180
+ index as default
181
+ };
182
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sources":["../../server/src/utils/pluginId.js","../../server/src/register.js","../../server/src/controllers/config.js","../../server/src/controllers/index.js","../../server/src/routes/index.js","../../server/src/services/config.js","../../server/src/services/index.js","../../server/src/index.js"],"sourcesContent":["'use strict';\n\nconst pluginPkg = require('../../../package.json');\n\nmodule.exports =\n pluginPkg.strapi.name ||\n pluginPkg.name.replace(/^(@_sh\\/strapi-)plugin-/i, '');\n","'use strict';\n\nconst pluginId = require('./utils/pluginId');\n\nmodule.exports = ({ strapi }) => {\n strapi.customFields.register({\n name: 'CKEditor',\n plugin: pluginId,\n type: 'richtext',\n });\n};\n","'use strict';\n\nconst pluginId = require('../utils/pluginId');\n\nmodule.exports = {\n getConfig: async (ctx) => {\n const { responsiveDimensions = false } = await strapi\n .plugin('upload')\n .service('upload')\n .getSettings();\n\n const config =\n (await strapi.plugin(pluginId).service('config').getConfig()) +\n `\\nglobalThis.SH_CKE_UPLOAD_ADAPTER_IS_RESPONSIVE = ${responsiveDimensions}`;\n\n ctx.type = 'application/javascript';\n ctx.send(config);\n },\n};\n","'use strict';\n\nconst config = require('./config');\n\nmodule.exports = {\n config,\n};\n","module.exports = {\n config: {\n type: 'admin',\n routes: [\n {\n method: 'GET',\n path: '/config/ckeditor',\n handler: 'config.getConfig',\n config: {\n auth: false,\n },\n },\n ],\n },\n};\n","'use strict';\n\nconst fs = require('fs');\n\nmodule.exports = ({ strapi }) => {\n return {\n getConfig() {\n const appDir = process.cwd();\n\n const fileName = 'ckeditor';\n\n for (const ext of ['js', 'ts']) {\n const filePath = `${appDir}/config/${fileName}.${ext}`;\n if (fs.existsSync(filePath)) {\n return (\n fs.readFileSync(filePath, 'utf8') +\n `\\nglobalThis.SH_CKE_CONFIG = CKEConfig()`\n );\n }\n }\n\n return `globalThis.SH_CKE_CONFIG = null`;\n },\n };\n};\n","'use strict';\n\nconst config = require('./config');\n\nmodule.exports = {\n config,\n};\n","'use strict';\n\nconst register = require('./register');\nconst controllers = require('./controllers');\nconst routes = require('./routes');\nconst services = require('./services');\n\nmodule.exports = {\n register,\n controllers,\n routes,\n services\n};\n"],"names":["pluginId","require$$0","register","strapi","config","controllers","routes","services","require$$1","require$$2","require$$3"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAAM,YAAY;IAElBA,aACE,UAAU,OAAO;ACHnB,MAAMA,aAAWC;AAEjB,IAAAC,aAAiB,CAAC,EAAE,QAAAC,cAAa;AAC/B,EAAAA,QAAO,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iB;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@_sh/strapi-plugin-ckeditor",
3
- "version": "3.0.2",
3
+ "version": "4.0.1",
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": [
@@ -12,47 +12,76 @@
12
12
  "rich text",
13
13
  "editor"
14
14
  ],
15
+ "author": {
16
+ "name": "nshenderov"
17
+ },
18
+ "homepage": "https://market.strapi.io/plugins/@_sh-strapi-plugin-ckeditor",
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "https://github.com/nshenderov/strapi-plugin-ckeditor.git"
22
+ },
15
23
  "strapi": {
16
24
  "name": "ckeditor5",
17
25
  "displayName": "CKEditor 5",
18
26
  "description": "Integrates CKEditor 5 into your Strapi project as a fully customizable custom field. (Unofficial integration)",
19
27
  "kind": "plugin"
20
28
  },
29
+ "exports": {
30
+ "./package.json": "./package.json",
31
+ "./strapi-admin": {
32
+ "source": "./admin/src/index.js",
33
+ "import": "./dist/admin/index.mjs",
34
+ "require": "./dist/admin/index.js",
35
+ "default": "./dist/admin/index.js"
36
+ },
37
+ "./strapi-server": {
38
+ "source": "./server/src/index.js",
39
+ "import": "./dist/server/index.mjs",
40
+ "require": "./dist/server/index.js",
41
+ "default": "./dist/server/index.js"
42
+ }
43
+ },
21
44
  "files": [
22
- "admin",
23
- "server",
24
- "strapi-admin.js",
25
- "strapi-server.js"
45
+ "dist",
46
+ "./strapi-server.js"
26
47
  ],
48
+ "scripts": {
49
+ "build": "strapi-plugin build",
50
+ "watch": "strapi-plugin watch",
51
+ "watch:link": "strapi-plugin watch:link",
52
+ "verify": "strapi-plugin verify",
53
+ "release": "release-it",
54
+ "release:info": "release-it --changelog"
55
+ },
27
56
  "dependencies": {
28
57
  "ckeditor5": "^43.1.0",
29
58
  "@ckeditor/ckeditor5-react": "^9.1.0",
30
- "@strapi/design-system": "^1.19.0",
59
+ "@strapi/design-system": "^2.0.0-rc.11",
31
60
  "prop-types": "^15.8.1",
32
61
  "sanitize-html": "^2.13.0"
33
62
  },
34
- "peerDependencies": {
35
- "@strapi/strapi": "^4.13.0"
36
- },
37
- "author": {
38
- "name": "nshenderov"
39
- },
40
- "homepage": "https://market.strapi.io/plugins/@_sh-strapi-plugin-ckeditor",
41
- "repository": {
42
- "type": "git",
43
- "url": "https://github.com/nshenderov/strapi-plugin-ckeditor.git"
63
+ "devDependencies": {
64
+ "@strapi/strapi": "^5.0.0",
65
+ "@strapi/sdk-plugin": "^5.2.6",
66
+ "prettier": "^3.3.3",
67
+ "react": "^18.3.1",
68
+ "react-dom": "^18.3.1",
69
+ "react-router-dom": "^6.26.2",
70
+ "styled-components": "^6.1.13",
71
+ "release-it": "^17.6.0",
72
+ "@release-it/conventional-changelog": "^8.0.1"
44
73
  },
45
- "scripts": {
46
- "release": "release-it",
47
- "release:info": "release-it --changelog"
74
+ "peerDependencies": {
75
+ "@strapi/strapi": "^5.0.0",
76
+ "@strapi/sdk-plugin": "^5.2.6",
77
+ "react": "^18.3.1",
78
+ "react-dom": "^18.3.1",
79
+ "react-router-dom": "^6.26.2",
80
+ "styled-components": "^6.1.13"
48
81
  },
49
82
  "engines": {
50
83
  "node": ">=18.0.0 <=20.x.x",
51
84
  "npm": ">=6.0.0"
52
85
  },
53
- "license": "MIT",
54
- "devDependencies": {
55
- "release-it": "^17.6.0",
56
- "@release-it/conventional-changelog": "^8.0.1"
57
- }
86
+ "license": "MIT"
58
87
  }
package/strapi-server.js CHANGED
@@ -1,3 +1,3 @@
1
- 'use strict';
1
+ "use strict";
2
2
 
3
- module.exports = require('./server');
3
+ module.exports = require("./dist/server");
@@ -1,46 +0,0 @@
1
- import * as React from "react";
2
- import styled from "styled-components";
3
- import { Icon } from "@strapi/design-system";
4
- import { Flex } from "@strapi/design-system";
5
-
6
- const IconBox = styled(Flex)`
7
- background-color: #f0f0ff; /* primary100 */
8
- border: 1px solid #d9d8ff; /* primary200 */
9
- svg > path {
10
- fill: #4945ff; /* primary600 */
11
- }
12
- `;
13
-
14
- const SvgIcon = () => (
15
- <svg
16
- width="68"
17
- height="64"
18
- viewBox="-20 -14 98 94"
19
- xmlns="http://www.w3.org/2000/svg"
20
- >
21
- <g fill="none" fill-rule="evenodd">
22
- <path
23
- d="M43.71 11.025a11.508 11.508 0 0 0-1.213 5.159c0 6.42 5.244 11.625 11.713 11.625.083 0 .167 0 .25-.002v16.282a5.464 5.464 0 0 1-2.756 4.739L30.986 60.7a5.548 5.548 0 0 1-5.512 0L4.756 48.828A5.464 5.464 0 0 1 2 44.089V20.344c0-1.955 1.05-3.76 2.756-4.738L25.474 3.733a5.548 5.548 0 0 1 5.512 0l12.724 7.292z"
24
- fill="#FFF"
25
- />
26
- <path
27
- d="M45.684 8.79a12.604 12.604 0 0 0-1.329 5.65c0 7.032 5.744 12.733 12.829 12.733.091 0 .183-.001.274-.003v17.834a5.987 5.987 0 0 1-3.019 5.19L31.747 63.196a6.076 6.076 0 0 1-6.037 0L3.02 50.193A5.984 5.984 0 0 1 0 45.003V18.997c0-2.14 1.15-4.119 3.019-5.19L25.71.804a6.076 6.076 0 0 1 6.037 0L45.684 8.79zm-29.44 11.89c-.834 0-1.51.671-1.51 1.498v.715c0 .828.676 1.498 1.51 1.498h25.489c.833 0 1.51-.67 1.51-1.498v-.715c0-.827-.677-1.498-1.51-1.498h-25.49.001zm0 9.227c-.834 0-1.51.671-1.51 1.498v.715c0 .828.676 1.498 1.51 1.498h18.479c.833 0 1.509-.67 1.509-1.498v-.715c0-.827-.676-1.498-1.51-1.498H16.244zm0 9.227c-.834 0-1.51.671-1.51 1.498v.715c0 .828.676 1.498 1.51 1.498h25.489c.833 0 1.51-.67 1.51-1.498v-.715c0-.827-.677-1.498-1.51-1.498h-25.49.001zm41.191-14.459c-5.835 0-10.565-4.695-10.565-10.486 0-5.792 4.73-10.487 10.565-10.487C63.27 3.703 68 8.398 68 14.19c0 5.791-4.73 10.486-10.565 10.486v-.001z"
28
- fill="#1EBC61"
29
- fill-rule="nonzero"
30
- />
31
- <path
32
- d="M60.857 15.995c0-.467-.084-.875-.251-1.225a2.547 2.547 0 0 0-.686-.88 2.888 2.888 0 0 0-1.026-.531 4.418 4.418 0 0 0-1.259-.175c-.134 0-.283.006-.447.018-.15.01-.3.034-.446.07l.075-1.4h3.587v-1.8h-5.462l-.214 5.06c.319-.116.682-.21 1.089-.28.406-.071.77-.107 1.088-.107.218 0 .437.021.655.063.218.041.413.114.585.218s.313.244.422.419c.109.175.163.391.163.65 0 .424-.132.745-.396.961a1.434 1.434 0 0 1-.938.325c-.352 0-.656-.1-.912-.3-.256-.2-.43-.453-.523-.762l-1.925.588c.1.35.258.664.472.943.214.279.47.514.767.706.298.191.63.339.995.443.365.104.749.156 1.151.156.437 0 .86-.064 1.272-.193.41-.13.778-.323 1.1-.581a2.8 2.8 0 0 0 .775-.981c.193-.396.29-.864.29-1.405h-.001z"
33
- fill="#FFF"
34
- fill-rule="nonzero"
35
- />
36
- </g>
37
- </svg>
38
- );
39
-
40
- const CKEditorIcon = () => (
41
- <IconBox justifyContent="center" alignItems="center" width={7} height={6} hasRadius aria-hidden>
42
- <Icon as={SvgIcon} />
43
- </IconBox>
44
- )
45
-
46
- export default CKEditorIcon;