@_sh/strapi-plugin-ckeditor 1.0.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/LICENSE +21 -0
- package/README.md +981 -0
- package/admin/src/components/CKEditor/build/ckeditor.js +7 -0
- package/admin/src/components/CKEditor/build/ckeditor.js.map +1 -0
- package/admin/src/components/CKEditor/build/translations/af.js +1 -0
- package/admin/src/components/CKEditor/build/translations/ar.js +1 -0
- package/admin/src/components/CKEditor/build/translations/ast.js +1 -0
- package/admin/src/components/CKEditor/build/translations/az.js +1 -0
- package/admin/src/components/CKEditor/build/translations/bg.js +1 -0
- package/admin/src/components/CKEditor/build/translations/bs.js +1 -0
- package/admin/src/components/CKEditor/build/translations/ca.js +1 -0
- package/admin/src/components/CKEditor/build/translations/cs.js +1 -0
- package/admin/src/components/CKEditor/build/translations/da.js +1 -0
- package/admin/src/components/CKEditor/build/translations/de-ch.js +1 -0
- package/admin/src/components/CKEditor/build/translations/de.js +1 -0
- package/admin/src/components/CKEditor/build/translations/el.js +1 -0
- package/admin/src/components/CKEditor/build/translations/en-au.js +1 -0
- package/admin/src/components/CKEditor/build/translations/en-gb.js +1 -0
- package/admin/src/components/CKEditor/build/translations/eo.js +1 -0
- package/admin/src/components/CKEditor/build/translations/es.js +1 -0
- package/admin/src/components/CKEditor/build/translations/et.js +1 -0
- package/admin/src/components/CKEditor/build/translations/eu.js +1 -0
- package/admin/src/components/CKEditor/build/translations/fa.js +1 -0
- package/admin/src/components/CKEditor/build/translations/fi.js +1 -0
- package/admin/src/components/CKEditor/build/translations/fr.js +1 -0
- package/admin/src/components/CKEditor/build/translations/gl.js +1 -0
- package/admin/src/components/CKEditor/build/translations/gu.js +1 -0
- package/admin/src/components/CKEditor/build/translations/he.js +1 -0
- package/admin/src/components/CKEditor/build/translations/hi.js +1 -0
- package/admin/src/components/CKEditor/build/translations/hr.js +1 -0
- package/admin/src/components/CKEditor/build/translations/hu.js +1 -0
- package/admin/src/components/CKEditor/build/translations/id.js +1 -0
- package/admin/src/components/CKEditor/build/translations/it.js +1 -0
- package/admin/src/components/CKEditor/build/translations/ja.js +1 -0
- package/admin/src/components/CKEditor/build/translations/jv.js +1 -0
- package/admin/src/components/CKEditor/build/translations/kk.js +1 -0
- package/admin/src/components/CKEditor/build/translations/km.js +1 -0
- package/admin/src/components/CKEditor/build/translations/kn.js +1 -0
- package/admin/src/components/CKEditor/build/translations/ko.js +1 -0
- package/admin/src/components/CKEditor/build/translations/ku.js +1 -0
- package/admin/src/components/CKEditor/build/translations/lt.js +1 -0
- package/admin/src/components/CKEditor/build/translations/lv.js +1 -0
- package/admin/src/components/CKEditor/build/translations/nb.js +1 -0
- package/admin/src/components/CKEditor/build/translations/ne.js +1 -0
- package/admin/src/components/CKEditor/build/translations/nl.js +1 -0
- package/admin/src/components/CKEditor/build/translations/no.js +1 -0
- package/admin/src/components/CKEditor/build/translations/oc.js +1 -0
- package/admin/src/components/CKEditor/build/translations/pl.js +1 -0
- package/admin/src/components/CKEditor/build/translations/pt-br.js +1 -0
- package/admin/src/components/CKEditor/build/translations/pt.js +1 -0
- package/admin/src/components/CKEditor/build/translations/ro.js +1 -0
- package/admin/src/components/CKEditor/build/translations/ru.js +1 -0
- package/admin/src/components/CKEditor/build/translations/si.js +1 -0
- package/admin/src/components/CKEditor/build/translations/sk.js +1 -0
- package/admin/src/components/CKEditor/build/translations/sl.js +1 -0
- package/admin/src/components/CKEditor/build/translations/sq.js +1 -0
- package/admin/src/components/CKEditor/build/translations/sr-latn.js +1 -0
- package/admin/src/components/CKEditor/build/translations/sr.js +1 -0
- package/admin/src/components/CKEditor/build/translations/sv.js +1 -0
- package/admin/src/components/CKEditor/build/translations/th.js +1 -0
- package/admin/src/components/CKEditor/build/translations/tk.js +1 -0
- package/admin/src/components/CKEditor/build/translations/tr.js +1 -0
- package/admin/src/components/CKEditor/build/translations/tt.js +1 -0
- package/admin/src/components/CKEditor/build/translations/ug.js +1 -0
- package/admin/src/components/CKEditor/build/translations/uk.js +1 -0
- package/admin/src/components/CKEditor/build/translations/uz.js +1 -0
- package/admin/src/components/CKEditor/build/translations/vi.js +1 -0
- package/admin/src/components/CKEditor/build/translations/zh-cn.js +1 -0
- package/admin/src/components/CKEditor/build/translations/zh.js +1 -0
- package/admin/src/components/CKEditor/index.js +139 -0
- package/admin/src/components/CKEditor/styles.js +520 -0
- package/admin/src/components/Initializer/index.js +26 -0
- package/admin/src/components/MediaLib/index.js +44 -0
- package/admin/src/components/Wysiwyg/index.js +77 -0
- package/admin/src/index.js +19 -0
- package/admin/src/pages/App/index.js +25 -0
- package/admin/src/pages/HomePage/index.js +20 -0
- package/admin/src/pluginId.js +6 -0
- package/admin/src/translations/en.json +1 -0
- package/admin/src/translations/fr.json +1 -0
- package/admin/src/utils/axiosInstance.js +40 -0
- package/admin/src/utils/getTrad.js +5 -0
- package/assets/ckeditor-d-1.jpg +0 -0
- package/assets/ckeditor-d-2.jpg +0 -0
- package/assets/ckeditor-d-3.jpg +0 -0
- package/assets/ckeditor-fontcolor1.jpg +0 -0
- package/assets/ckeditor-fontcolor2.jpg +0 -0
- package/assets/ckeditor-fontcolor3.jpg +0 -0
- package/assets/ckeditor-tables.jpg +0 -0
- package/assets/ckeditor-toolbar.jpg +0 -0
- package/assets/ckeditor.jpg +0 -0
- package/assets/ckeditor1.jpg +0 -0
- package/package.json +44 -0
- package/server/bootstrap.js +5 -0
- package/server/config/index.js +6 -0
- package/server/content-types/index.js +3 -0
- package/server/controllers/config.js +9 -0
- package/server/controllers/index.js +7 -0
- package/server/destroy.js +5 -0
- package/server/index.js +25 -0
- package/server/middlewares/index.js +3 -0
- package/server/policies/index.js +3 -0
- package/server/register.js +5 -0
- package/server/routes/index.js +8 -0
- package/server/services/config.js +13 -0
- package/server/services/index.js +7 -0
- package/strapi-admin.js +3 -0
- package/strapi-server.js +3 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
*
|
|
3
|
+
* HomePage
|
|
4
|
+
*
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import React, { memo } from 'react';
|
|
8
|
+
// import PropTypes from 'prop-types';
|
|
9
|
+
import pluginId from '../../pluginId';
|
|
10
|
+
|
|
11
|
+
const HomePage = () => {
|
|
12
|
+
return (
|
|
13
|
+
<div>
|
|
14
|
+
<h1>{pluginId}'s HomePage</h1>
|
|
15
|
+
<p>Happy coding</p>
|
|
16
|
+
</div>
|
|
17
|
+
);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default memo(HomePage);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* axios with a custom config.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import axios from 'axios';
|
|
6
|
+
import { auth } from '@strapi/helper-plugin';
|
|
7
|
+
|
|
8
|
+
const instance = axios.create({
|
|
9
|
+
baseURL: process.env.STRAPI_ADMIN_BACKEND_URL,
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
instance.interceptors.request.use(
|
|
13
|
+
async config => {
|
|
14
|
+
config.headers = {
|
|
15
|
+
Authorization: `Bearer ${auth.getToken()}`,
|
|
16
|
+
Accept: 'application/json',
|
|
17
|
+
'Content-Type': 'application/json',
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
return config;
|
|
21
|
+
},
|
|
22
|
+
error => {
|
|
23
|
+
Promise.reject(error);
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
instance.interceptors.response.use(
|
|
28
|
+
response => response,
|
|
29
|
+
error => {
|
|
30
|
+
// whatever you want to do with the error
|
|
31
|
+
if (error.response?.status === 401) {
|
|
32
|
+
auth.clearAppStorage();
|
|
33
|
+
window.location.reload();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
throw error;
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
export default instance;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@_sh/strapi-plugin-ckeditor",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Replaces the default Strapi WYSIWYG editor with a customized buil of CKEditor 5 packed with useful plugins.",
|
|
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
|
+
"icon": "edit",
|
|
17
|
+
"name": "ckeditor",
|
|
18
|
+
"displayName": "CKEditor 5",
|
|
19
|
+
"description": "Replaces the default Strapi WYSIWYG editor with a customized buil of CKEditor 5 packed with useful plugins.",
|
|
20
|
+
"kind": "plugin"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@ckeditor/ckeditor5-react": "5.0.0"
|
|
24
|
+
},
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"@strapi/strapi": "^4.0.0"
|
|
27
|
+
},
|
|
28
|
+
"author": {
|
|
29
|
+
"name": "nshenderov"
|
|
30
|
+
},
|
|
31
|
+
"homepage": "https://github.com/nshenderov/strapi-plugin-ckeditor",
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "https://github.com/nshenderov/strapi-plugin-ckeditor.git"
|
|
35
|
+
},
|
|
36
|
+
"scripts": {
|
|
37
|
+
"test": "echo \"Error: no tests specified\" && exit 1"
|
|
38
|
+
},
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=12.x.x <=16.x.x",
|
|
41
|
+
"npm": ">=6.0.0"
|
|
42
|
+
},
|
|
43
|
+
"license": "MIT"
|
|
44
|
+
}
|
package/server/index.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const register = require('./register');
|
|
4
|
+
const bootstrap = require('./bootstrap');
|
|
5
|
+
const destroy = require('./destroy');
|
|
6
|
+
const config = require('./config');
|
|
7
|
+
const contentTypes = require('./content-types');
|
|
8
|
+
const controllers = require('./controllers');
|
|
9
|
+
const routes = require('./routes');
|
|
10
|
+
const middlewares = require('./middlewares');
|
|
11
|
+
const policies = require('./policies');
|
|
12
|
+
const services = require('./services');
|
|
13
|
+
|
|
14
|
+
module.exports = {
|
|
15
|
+
register,
|
|
16
|
+
bootstrap,
|
|
17
|
+
destroy,
|
|
18
|
+
config,
|
|
19
|
+
controllers,
|
|
20
|
+
routes,
|
|
21
|
+
services,
|
|
22
|
+
contentTypes,
|
|
23
|
+
policies,
|
|
24
|
+
middlewares,
|
|
25
|
+
};
|
package/strapi-admin.js
ADDED
package/strapi-server.js
ADDED