forked from melishev/strapi-plugin-react-editorjs
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.js
33 lines (31 loc) · 928 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import pluginPkg from '../../package.json';
import Wysiwyg from './components/Wysiwyg';
import pluginId from './pluginId';
export default {
register(app) {
// executes as soon as the plugin is loaded
const pluginDescription = pluginPkg.strapi.description || pluginPkg.description;
app.registerPlugin({
blockerComponent: null,
blockerComponentProps: {},
description: pluginDescription,
icon: pluginPkg.strapi.icon,
intlLabel: {
id: pluginId,
defaultMessage: pluginId
},
id: pluginId,
initializer: () => null,
injectedComponents: [],
isReady: true,
isRequired: pluginPkg.strapi.required || false,
mainComponent: null,
name: pluginPkg.strapi.name,
preventComponentRendering: false,
settings: null,
trads: {},
});
app.addFields({ type: 'wysiwyg', Component: Wysiwyg });
},
bootstrap() {},
};