@_sh/strapi-plugin-ckeditor 2.0.2 → 2.0.4
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/LICENSE +20 -20
- package/README.md +448 -448
- package/admin/src/components/CKEditorIcon.js +45 -45
- package/admin/src/components/Input/CKEditor/configs/base.js +627 -627
- package/admin/src/components/Input/CKEditor/configs/blockBaloon.js +25 -25
- package/admin/src/components/Input/CKEditor/configs/index.js +11 -11
- package/admin/src/components/Input/CKEditor/configs/toolbar.js +17 -17
- package/admin/src/components/Input/CKEditor/configs/toolbarBaloon.js +17 -17
- package/admin/src/components/Input/CKEditor/configuration.js +165 -165
- package/admin/src/components/Input/CKEditor/index.js +119 -119
- package/admin/src/components/Input/CKEditor/plugins/StrapiMediaLib.js +43 -43
- package/admin/src/components/Input/CKEditor/plugins/StrapiUploadAdapter.js +204 -203
- package/admin/src/components/Input/CKEditor/plugins/index.js +1 -1
- package/admin/src/components/Input/CKEditor/styling.js +16 -16
- package/admin/src/components/Input/CKEditor/theme/additional.js +212 -166
- package/admin/src/components/Input/CKEditor/theme/common.js +232 -277
- package/admin/src/components/Input/CKEditor/theme/dark.js +144 -144
- package/admin/src/components/Input/CKEditor/theme/index.js +12 -12
- package/admin/src/components/Input/CKEditor/theme/light.js +135 -135
- package/admin/src/components/Input/MediaLib/index.js +78 -78
- package/admin/src/components/Input/index.js +47 -47
- package/admin/src/index.js +109 -109
- package/admin/src/utils/getEditorConfig.js +37 -37
- package/admin/src/utils/pluginId.js +4 -4
- package/package.json +86 -86
- package/server/controllers/config.js +16 -16
- package/server/controllers/index.js +7 -7
- package/server/index.js +13 -13
- package/server/register.js +11 -11
- package/server/routes/index.js +15 -15
- package/server/services/config.js +19 -19
- package/server/services/index.js +7 -7
- package/strapi-admin.js +3 -3
- package/strapi-server.js +3 -3
package/package.json
CHANGED
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@_sh/strapi-plugin-ckeditor",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"description": "Integrates CKEditor 5 into your Strapi project as a fully customizable custom field. (Unofficial integration)",
|
|
5
|
-
"private": false,
|
|
6
|
-
"keywords": [
|
|
7
|
-
"strapi",
|
|
8
|
-
"ckeditor",
|
|
9
|
-
"ckeditor5",
|
|
10
|
-
"ckeditor 5",
|
|
11
|
-
"wysiwyg",
|
|
12
|
-
"rich text",
|
|
13
|
-
"editor"
|
|
14
|
-
],
|
|
15
|
-
"strapi": {
|
|
16
|
-
"name": "ckeditor5",
|
|
17
|
-
"displayName": "CKEditor 5",
|
|
18
|
-
"description": "Integrates CKEditor 5 into your Strapi project as a fully customizable custom field. (Unofficial integration)",
|
|
19
|
-
"kind": "plugin"
|
|
20
|
-
},
|
|
21
|
-
"files": [
|
|
22
|
-
"admin",
|
|
23
|
-
"server",
|
|
24
|
-
"strapi-admin.js",
|
|
25
|
-
"strapi-server.js"
|
|
26
|
-
],
|
|
27
|
-
"dependencies": {
|
|
28
|
-
"ckeditor5": "^36.0.0",
|
|
29
|
-
"@ckeditor/ckeditor5-react": "^5.0.6",
|
|
30
|
-
"@ckeditor/ckeditor5-alignment": "^36.0.0",
|
|
31
|
-
"@ckeditor/ckeditor5-autoformat": "^36.0.0",
|
|
32
|
-
"@ckeditor/ckeditor5-autosave": "^36.0.0",
|
|
33
|
-
"@ckeditor/ckeditor5-basic-styles": "^36.0.0",
|
|
34
|
-
"@ckeditor/ckeditor5-block-quote": "^36.0.0",
|
|
35
|
-
"@ckeditor/ckeditor5-style": "^36.0.0",
|
|
36
|
-
"@ckeditor/ckeditor5-code-block": "^36.0.0",
|
|
37
|
-
"@ckeditor/ckeditor5-easy-image": "^36.0.0",
|
|
38
|
-
"@ckeditor/ckeditor5-editor-classic": "^36.0.0",
|
|
39
|
-
"@ckeditor/ckeditor5-essentials": "^36.0.0",
|
|
40
|
-
"@ckeditor/ckeditor5-find-and-replace": "^36.0.0",
|
|
41
|
-
"@ckeditor/ckeditor5-heading": "^36.0.0",
|
|
42
|
-
"@ckeditor/ckeditor5-highlight": "^36.0.0",
|
|
43
|
-
"@ckeditor/ckeditor5-horizontal-line": "^36.0.0",
|
|
44
|
-
"@ckeditor/ckeditor5-html-embed": "^36.0.0",
|
|
45
|
-
"@ckeditor/ckeditor5-html-support": "^36.0.0",
|
|
46
|
-
"@ckeditor/ckeditor5-image": "^36.0.0",
|
|
47
|
-
"@ckeditor/ckeditor5-indent": "^36.0.0",
|
|
48
|
-
"@ckeditor/ckeditor5-language": "^36.0.0",
|
|
49
|
-
"@ckeditor/ckeditor5-link": "^36.0.0",
|
|
50
|
-
"@ckeditor/ckeditor5-list": "^36.0.0",
|
|
51
|
-
"@ckeditor/ckeditor5-mention": "^36.0.0",
|
|
52
|
-
"@ckeditor/ckeditor5-media-embed": "^36.0.0",
|
|
53
|
-
"@ckeditor/ckeditor5-page-break": "^36.0.0",
|
|
54
|
-
"@ckeditor/ckeditor5-paragraph": "^36.0.0",
|
|
55
|
-
"@ckeditor/ckeditor5-paste-from-office": "^36.0.0",
|
|
56
|
-
"@ckeditor/ckeditor5-remove-format": "^36.0.0",
|
|
57
|
-
"@ckeditor/ckeditor5-special-characters": "^36.0.0",
|
|
58
|
-
"@ckeditor/ckeditor5-source-editing": "^36.0.0",
|
|
59
|
-
"@ckeditor/ckeditor5-table": "^36.0.0",
|
|
60
|
-
"@ckeditor/ckeditor5-theme-lark": "^36.0.0",
|
|
61
|
-
"@ckeditor/ckeditor5-typing": "^36.0.0",
|
|
62
|
-
"@ckeditor/ckeditor5-upload": "^36.0.0",
|
|
63
|
-
"@ckeditor/ckeditor5-word-count": "^36.0.0",
|
|
64
|
-
"sanitize-html": "^2.8.1",
|
|
65
|
-
"@_sh/ckeditor5-font-with-picker": "^0.0.1"
|
|
66
|
-
},
|
|
67
|
-
"peerDependencies": {
|
|
68
|
-
"@strapi/strapi": "^4.4.0"
|
|
69
|
-
},
|
|
70
|
-
"author": {
|
|
71
|
-
"name": "nshenderov"
|
|
72
|
-
},
|
|
73
|
-
"homepage": "https://market.strapi.io/plugins/@_sh-strapi-plugin-ckeditor",
|
|
74
|
-
"repository": {
|
|
75
|
-
"type": "git",
|
|
76
|
-
"url": "https://github.com/nshenderov/strapi-plugin-ckeditor.git"
|
|
77
|
-
},
|
|
78
|
-
"scripts": {
|
|
79
|
-
"test": "echo \"Error: no tests specified\" && exit 1"
|
|
80
|
-
},
|
|
81
|
-
"engines": {
|
|
82
|
-
"node": ">=14.19.1 <=18.x.x",
|
|
83
|
-
"npm": ">=6.0.0"
|
|
84
|
-
},
|
|
85
|
-
"license": "MIT"
|
|
86
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@_sh/strapi-plugin-ckeditor",
|
|
3
|
+
"version": "2.0.4",
|
|
4
|
+
"description": "Integrates CKEditor 5 into your Strapi project as a fully customizable custom field. (Unofficial integration)",
|
|
5
|
+
"private": false,
|
|
6
|
+
"keywords": [
|
|
7
|
+
"strapi",
|
|
8
|
+
"ckeditor",
|
|
9
|
+
"ckeditor5",
|
|
10
|
+
"ckeditor 5",
|
|
11
|
+
"wysiwyg",
|
|
12
|
+
"rich text",
|
|
13
|
+
"editor"
|
|
14
|
+
],
|
|
15
|
+
"strapi": {
|
|
16
|
+
"name": "ckeditor5",
|
|
17
|
+
"displayName": "CKEditor 5",
|
|
18
|
+
"description": "Integrates CKEditor 5 into your Strapi project as a fully customizable custom field. (Unofficial integration)",
|
|
19
|
+
"kind": "plugin"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"admin",
|
|
23
|
+
"server",
|
|
24
|
+
"strapi-admin.js",
|
|
25
|
+
"strapi-server.js"
|
|
26
|
+
],
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"ckeditor5": "^36.0.0",
|
|
29
|
+
"@ckeditor/ckeditor5-react": "^5.0.6",
|
|
30
|
+
"@ckeditor/ckeditor5-alignment": "^36.0.0",
|
|
31
|
+
"@ckeditor/ckeditor5-autoformat": "^36.0.0",
|
|
32
|
+
"@ckeditor/ckeditor5-autosave": "^36.0.0",
|
|
33
|
+
"@ckeditor/ckeditor5-basic-styles": "^36.0.0",
|
|
34
|
+
"@ckeditor/ckeditor5-block-quote": "^36.0.0",
|
|
35
|
+
"@ckeditor/ckeditor5-style": "^36.0.0",
|
|
36
|
+
"@ckeditor/ckeditor5-code-block": "^36.0.0",
|
|
37
|
+
"@ckeditor/ckeditor5-easy-image": "^36.0.0",
|
|
38
|
+
"@ckeditor/ckeditor5-editor-classic": "^36.0.0",
|
|
39
|
+
"@ckeditor/ckeditor5-essentials": "^36.0.0",
|
|
40
|
+
"@ckeditor/ckeditor5-find-and-replace": "^36.0.0",
|
|
41
|
+
"@ckeditor/ckeditor5-heading": "^36.0.0",
|
|
42
|
+
"@ckeditor/ckeditor5-highlight": "^36.0.0",
|
|
43
|
+
"@ckeditor/ckeditor5-horizontal-line": "^36.0.0",
|
|
44
|
+
"@ckeditor/ckeditor5-html-embed": "^36.0.0",
|
|
45
|
+
"@ckeditor/ckeditor5-html-support": "^36.0.0",
|
|
46
|
+
"@ckeditor/ckeditor5-image": "^36.0.0",
|
|
47
|
+
"@ckeditor/ckeditor5-indent": "^36.0.0",
|
|
48
|
+
"@ckeditor/ckeditor5-language": "^36.0.0",
|
|
49
|
+
"@ckeditor/ckeditor5-link": "^36.0.0",
|
|
50
|
+
"@ckeditor/ckeditor5-list": "^36.0.0",
|
|
51
|
+
"@ckeditor/ckeditor5-mention": "^36.0.0",
|
|
52
|
+
"@ckeditor/ckeditor5-media-embed": "^36.0.0",
|
|
53
|
+
"@ckeditor/ckeditor5-page-break": "^36.0.0",
|
|
54
|
+
"@ckeditor/ckeditor5-paragraph": "^36.0.0",
|
|
55
|
+
"@ckeditor/ckeditor5-paste-from-office": "^36.0.0",
|
|
56
|
+
"@ckeditor/ckeditor5-remove-format": "^36.0.0",
|
|
57
|
+
"@ckeditor/ckeditor5-special-characters": "^36.0.0",
|
|
58
|
+
"@ckeditor/ckeditor5-source-editing": "^36.0.0",
|
|
59
|
+
"@ckeditor/ckeditor5-table": "^36.0.0",
|
|
60
|
+
"@ckeditor/ckeditor5-theme-lark": "^36.0.0",
|
|
61
|
+
"@ckeditor/ckeditor5-typing": "^36.0.0",
|
|
62
|
+
"@ckeditor/ckeditor5-upload": "^36.0.0",
|
|
63
|
+
"@ckeditor/ckeditor5-word-count": "^36.0.0",
|
|
64
|
+
"sanitize-html": "^2.8.1",
|
|
65
|
+
"@_sh/ckeditor5-font-with-picker": "^0.0.1"
|
|
66
|
+
},
|
|
67
|
+
"peerDependencies": {
|
|
68
|
+
"@strapi/strapi": "^4.4.0"
|
|
69
|
+
},
|
|
70
|
+
"author": {
|
|
71
|
+
"name": "nshenderov"
|
|
72
|
+
},
|
|
73
|
+
"homepage": "https://market.strapi.io/plugins/@_sh-strapi-plugin-ckeditor",
|
|
74
|
+
"repository": {
|
|
75
|
+
"type": "git",
|
|
76
|
+
"url": "https://github.com/nshenderov/strapi-plugin-ckeditor.git"
|
|
77
|
+
},
|
|
78
|
+
"scripts": {
|
|
79
|
+
"test": "echo \"Error: no tests specified\" && exit 1"
|
|
80
|
+
},
|
|
81
|
+
"engines": {
|
|
82
|
+
"node": ">=14.19.1 <=18.x.x",
|
|
83
|
+
"npm": ">=6.0.0"
|
|
84
|
+
},
|
|
85
|
+
"license": "MIT"
|
|
86
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const pluginId = require("../../admin/src/utils/pluginId");
|
|
4
|
-
|
|
5
|
-
module.exports = {
|
|
6
|
-
|
|
7
|
-
getUploadConfig: async (ctx) => {
|
|
8
|
-
const uploadConfig = await strapi.plugin(pluginId).service('config').getUploadConfig('upload').getSettings();
|
|
9
|
-
ctx.send(uploadConfig);
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
getCKEditorConfig: async (ctx) => {
|
|
13
|
-
const config = await strapi.plugin(pluginId).service('config').getCKEditorConfig();
|
|
14
|
-
ctx.type = 'text/javascript';
|
|
15
|
-
ctx.send(config);
|
|
16
|
-
}
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const pluginId = require("../../admin/src/utils/pluginId");
|
|
4
|
+
|
|
5
|
+
module.exports = {
|
|
6
|
+
|
|
7
|
+
getUploadConfig: async (ctx) => {
|
|
8
|
+
const uploadConfig = await strapi.plugin(pluginId).service('config').getUploadConfig('upload').getSettings();
|
|
9
|
+
ctx.send(uploadConfig);
|
|
10
|
+
},
|
|
11
|
+
|
|
12
|
+
getCKEditorConfig: async (ctx) => {
|
|
13
|
+
const config = await strapi.plugin(pluginId).service('config').getCKEditorConfig();
|
|
14
|
+
ctx.type = 'text/javascript';
|
|
15
|
+
ctx.send(config);
|
|
16
|
+
}
|
|
17
17
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const config = require('./config');
|
|
4
|
-
|
|
5
|
-
module.exports = {
|
|
6
|
-
config
|
|
7
|
-
};
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const config = require('./config');
|
|
4
|
+
|
|
5
|
+
module.exports = {
|
|
6
|
+
config
|
|
7
|
+
};
|
package/server/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const register = require('./register');
|
|
4
|
-
const controllers = require('./controllers');
|
|
5
|
-
const routes = require('./routes');
|
|
6
|
-
const services = require('./services');
|
|
7
|
-
|
|
8
|
-
module.exports = {
|
|
9
|
-
register,
|
|
10
|
-
controllers,
|
|
11
|
-
routes,
|
|
12
|
-
services
|
|
13
|
-
};
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const register = require('./register');
|
|
4
|
+
const controllers = require('./controllers');
|
|
5
|
+
const routes = require('./routes');
|
|
6
|
+
const services = require('./services');
|
|
7
|
+
|
|
8
|
+
module.exports = {
|
|
9
|
+
register,
|
|
10
|
+
controllers,
|
|
11
|
+
routes,
|
|
12
|
+
services
|
|
13
|
+
};
|
package/server/register.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const pluginId = require("../admin/src/utils/pluginId");
|
|
4
|
-
|
|
5
|
-
module.exports = ({ strapi }) => {
|
|
6
|
-
strapi.customFields.register({
|
|
7
|
-
name: 'CKEditor',
|
|
8
|
-
plugin: pluginId,
|
|
9
|
-
type: 'richtext'
|
|
10
|
-
})
|
|
11
|
-
};
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const pluginId = require("../admin/src/utils/pluginId");
|
|
4
|
+
|
|
5
|
+
module.exports = ({ strapi }) => {
|
|
6
|
+
strapi.customFields.register({
|
|
7
|
+
name: 'CKEditor',
|
|
8
|
+
plugin: pluginId,
|
|
9
|
+
type: 'richtext'
|
|
10
|
+
})
|
|
11
|
+
};
|
package/server/routes/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
module.exports = [
|
|
2
|
-
{
|
|
3
|
-
method: 'GET',
|
|
4
|
-
path: '/config/upload',
|
|
5
|
-
handler: 'config.getUploadConfig',
|
|
6
|
-
},
|
|
7
|
-
{
|
|
8
|
-
method: 'GET',
|
|
9
|
-
path: '/ckeditor-config',
|
|
10
|
-
handler: 'config.getCKEditorConfig',
|
|
11
|
-
config: {
|
|
12
|
-
auth: false
|
|
13
|
-
},
|
|
14
|
-
}
|
|
15
|
-
];
|
|
1
|
+
module.exports = [
|
|
2
|
+
{
|
|
3
|
+
method: 'GET',
|
|
4
|
+
path: '/config/upload',
|
|
5
|
+
handler: 'config.getUploadConfig',
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
method: 'GET',
|
|
9
|
+
path: '/ckeditor-config',
|
|
10
|
+
handler: 'config.getCKEditorConfig',
|
|
11
|
+
config: {
|
|
12
|
+
auth: false
|
|
13
|
+
},
|
|
14
|
+
}
|
|
15
|
+
];
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const fs = require("fs");
|
|
4
|
-
|
|
5
|
-
module.exports = ({ strapi }) => {
|
|
6
|
-
return {
|
|
7
|
-
getUploadConfig(name) {
|
|
8
|
-
return strapi.plugin('upload').service(name) ?? {};
|
|
9
|
-
},
|
|
10
|
-
getCKEditorConfig() {
|
|
11
|
-
const appDir = process.cwd();
|
|
12
|
-
|
|
13
|
-
const filename = `${appDir}/config/ckeditor.txt`;
|
|
14
|
-
|
|
15
|
-
return fs.existsSync(filename)
|
|
16
|
-
? fs.readFileSync(filename)
|
|
17
|
-
: 'globalThis.CKEditorConfig = null'
|
|
18
|
-
},
|
|
19
|
-
};
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const fs = require("fs");
|
|
4
|
+
|
|
5
|
+
module.exports = ({ strapi }) => {
|
|
6
|
+
return {
|
|
7
|
+
getUploadConfig(name) {
|
|
8
|
+
return strapi.plugin('upload').service(name) ?? {};
|
|
9
|
+
},
|
|
10
|
+
getCKEditorConfig() {
|
|
11
|
+
const appDir = process.cwd();
|
|
12
|
+
|
|
13
|
+
const filename = `${appDir}/config/ckeditor.txt`;
|
|
14
|
+
|
|
15
|
+
return fs.existsSync(filename)
|
|
16
|
+
? fs.readFileSync(filename)
|
|
17
|
+
: 'globalThis.CKEditorConfig = null'
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
20
|
};
|
package/server/services/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const config = require('./config');
|
|
4
|
-
|
|
5
|
-
module.exports = {
|
|
6
|
-
config
|
|
7
|
-
};
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const config = require('./config');
|
|
4
|
+
|
|
5
|
+
module.exports = {
|
|
6
|
+
config
|
|
7
|
+
};
|
package/strapi-admin.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
module.exports = require('./admin/src').default;
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
module.exports = require('./admin/src').default;
|
package/strapi-server.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
module.exports = require('./server');
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
module.exports = require('./server');
|