Closed Kaherdin closed 2 years ago
Okay, I've installed the beta (npm install strapi-plugin-react-editorjs@2.0.0-beta.1)from jaskipper. Thanks a lot for that.
But I still get an error with axios missing when I'm trying to copy/past an image by url. I see that you fix that in a commit, but I didn't work.
Neither that the image upload plugin too : https://snipboard.io/jQepzP.jpg Can you help me ?
Hi @Kaherdin. At this time, the newest changes that I've incorporated are not in the beta, so if you install from npm/yarn, it won't have the latest changes (@melishev, it would be great if you could look at this and accept the pull request).
The way you can use my latest changes would be the following:
yarn remove strapi-plugin-react-editorjs
# or
npm uninstall strapi-plugin-react-editorjs
git clone --single-branch --branch beta-v4 https://github.com/jaskipper/strapi-plugin-react-editorjs.git
cd strapi-plugin-react-editorjs
yarn install
or npm install
module.exports = ({ env }) => ({
// ...
'react-editorjs': {
enabled: true,
resolve: './src/plugins/strapi-plugin-react-editorjs'
},
// ...
})
In order for Strapi to show the Link Tool thumbnails correctly, you will need to edit the 'strapi::security' line in ./config/middlewares.js. Change that line to the following (do this at your own risk).
module.exports = [
// ...
{
name: 'strapi::security',
config: {
contentSecurityPolicy: {
directives: {
'img-src': ['*'],
},
}
},
},
// ...
];
@jaskipper - Thanks for your answer and help to the community @Kaherdin - Yes, the current version of the beta is a little unstable (that's why it is beta), in the coming days we will release a new update that will fix many bugs
@Kaherdin Well, the bot didn't send out an automatic beta update message, so I do it. Please check if your issue is fixed in the new beta version⚠️.
Thanks !! The version 2.0.0-beta.2 is working fine with v4 ! I'm struggling to customize it, it didn't work anymore with strapi V4 to make a copy of customTools to extensions folder.
Hi @Kaherdin. So glad to hear that it is working well! Yes, the old way of customizing doesn't work in v4. I've written some instructions in the beta readme on how to customize in v4. See the section "How to extend/develop this plugin (optional)" here: https://github.com/melishev/strapi-plugin-react-editorjs/tree/beta. You'll need to clone the beta branch. If I find a better way, I'll update. If anyone else knows a better way, let us know!
Yes, I will use patch-package for this. I really think it's easier. I wanted to add more addon, like ColorPlugin, what I did :
npx patch-package strapi-plugin-react-editorjs
npx patch-package
@Kaherdin - Interesting. I'll check that out. I'm assuming changes don't persist if you were to update to a newer version that comes out in the future, is that right?
It will generate a diff and also check if there is an update and/or conflict. So it can work with newer version
@Kaherdin, awesome! I still would like to find a way that is similar to how it was done in Strapi 3. However using patch-package does sound easier and promising. Thanks for the info!
Well, since this issue has been resolved, then I will close it, if there are problems on this topic again, feel free to write about it.
Hello,
I'm using strapi V4 and I'm trying to install make this plugin works, but I cannot ! I think you should add more documentations, even an example.
Should I need to enable the plugin in plugin.js ?
editorjs: { enabled: true, },