@softkit/strapi-plugin-react-editorjs
v2.0.4
Published
Plugin for Strapi Headless CMS, hiding the standard WYSIWYG editor and replacing it with Editor.js
Downloads
73
Maintainers
Readme
⚠️ This is the Strapi v5 version of this plugin! For Strapi v4, please use v1.x releases.
🙉 What it is?
This is a plugin for Strapi Headless CMS that replaces the standard wysiwyg editor with the cool Editor.js and all its compatible add-ons.
🍀 Supported official add-ons
- [x] Paragraph Tool (default)
- [x] Embed Tool
- [x] Table tool
- [x] List Tool
- [x] Warning Tool
- [x] Code Tool
- [x] Link Tool
- [x] Image Tool
- [x] Raw HTML Tool
- [x] Heading Tool
- [x] Quote Tool
- [x] Marker Tool
- [x] Checklist Tool
- [x] Delimiter Tool
- [x] InlineCode Tool
- [x] Change Font Size
- [ ] Personality Tool
- [ ] Attaches Tool
All of the above add-ons (if added) work initially when the plugin is loaded. You can also customize the add-ons available in your application using the instructions below.
🤟🏻 Getting Started
pnpm add @softkit/strapi-plugin-react-editorjs
# or
npm install @softkit/strapi-plugin-react-editorjsIn order for Strapi to show the Link Tool thumbnails correctly and for EditorJS plugins to work, you will need to edit the strapi::security middleware in ./config/middlewares.js (do this at your own risk):
module.exports = [
// ...
{
name: 'strapi::security',
config: {
contentSecurityPolicy: {
directives: {
'img-src': ['*'],
'script-src': ["'self'", "'unsafe-eval'"],
},
}
},
},
// ...
];⚙️ How to extend/develop this plugin (optional)
If you want to change the look of the editor or add/remove editorJS plugins, you will need to do the following:
- If this plugin is already installed, uninstall it first:
pnpm remove @softkit/strapi-plugin-react-editorjs
# or
npm uninstall @softkit/strapi-plugin-react-editorjs- Go to the ./src/plugins folder (create it if it doesn't exist) and clone the project:
git clone https://github.com/softkitit/strapi-plugin-react-editorjs.git- Go into the plugin and install dependencies:
cd strapi-plugin-react-editorjspnpm install
- In your Strapi v5
./config/plugins.js(or.ts) file, add:
module.exports = ({ env }) => ({
// ...
'editorjs': {
enabled: true,
resolve: './src/plugins/strapi-plugin-react-editorjs'
},
// ...
})- To make changes to EditorJS plugins, edit the
./src/plugins/strapi-plugin-react-editorjs/admin/src/config/customTools.jsfile.- Note: the Image Tool add-on has been highly customized in order to work in Strapi and cannot be edited in the
customTools.jsfile. If you wish to develop it further, you may, but it will take much more advanced knowledge and testing.
- Note: the Image Tool add-on has been highly customized in order to work in Strapi and cannot be edited in the
- Rebuild Strapi after installation and after any changes made in the plugin.
pnpm run buildPlease note that the add-ons are configured for Strapi, be careful when changing the configuration.
👨🏻🏭 Developing
- Personality Tool
- Attaches Tool
- Full screen mode
⭐️ Show your support
Give a star if this project helped you.
