melishev / strapi-plugin-react-editorjs

📝 Plugin for Strapi Headless CMS, hiding the standard WYSIWYG editor on Editor.js
https://www.npmjs.com/package/strapi-plugin-react-editorjs
MIT License
166 stars 71 forks source link

Strapi Not Showing Editor.js #31

Open jared-leddy opened 2 years ago

jared-leddy commented 2 years ago

The plugins section shows that it's installed, but it doesn't show up when trying to edit a post. I've tried to follow issue #27, and other issues, but nothing seems to work. What am I missing? What are the requirements for installation?

The Strapi docs state just adding the below code into the middlware.js file:

module.exports = [
  // ...
  {
    name: 'strapi::security',
    config: {
      contentSecurityPolicy: {
        directives: {
          'img-src': ['*'],
        },
      }
    },
  },
  // ...
];

All efforts are not resulting in the editor being available.

melishev commented 2 years ago

Hello @jared-leddy .

Please provide more information about the version of strapi and plugin you are using.

melishev commented 2 years ago

Well, I'm closing this issue because I didn't get a response.

jared-leddy commented 2 years ago

Sorry, I didn't see the response. See below.

  "dependencies": {
    "@strapi/strapi": "4.1.7",
    "strapi-plugin-react-editorjs": "^2.0.0",
  }
bavicj commented 2 years ago

@melishev I have the same issues, same strapi and plugin version.

bavicj commented 2 years ago

@jared-leddy I just switched from light to dark mode and it started to work

jared-leddy commented 2 years ago

@jared-leddy I just switched from light to dark mode and it started to work

Thanks for the tip. It's frankly a silly solution, especially if it works, but I'll test it and post my results.

jared-leddy commented 2 years ago

@bavicj, once the ticket below is resolved I can test it.

https://github.com/strapi/strapi/issues/13085

jared-leddy commented 2 years ago

@bavicj & @melishev, FYI, npm run build was the fix.

melishev commented 2 years ago

@jared-leddy @bavicj

this is very funny and strange, do I understand correctly that in dev mode with a dark theme, the Strapi plugin stops displaying?

jared-leddy commented 2 years ago

@jared-leddy @bavicj

this is very funny and strange, do I understand correctly that in dev mode with a dark theme, the Strapi plugin stops displaying?

For me, once I ran the build script, it works in both light and dark modes.

image image
bavicj commented 2 years ago

It is really strange, I did yarn build after plugin install and nothing happened, rich text fields still showed MD editor. After that I uninstalled and cloned directly as local plugin. This way it worked. So I removed local plugin, installed via yarn, build, and again original MD editor... Than I switched to dark mode and from nowhere it was working, rich text editor was editorjs..I tried again to uninstall/install and was not able to reproduce it..I think we could close this issue and see if someone else report something similar, or it was just glitch on my local env...

dcakmak commented 2 years ago

same problem here...

kgrosvenor commented 2 years ago

I've added some work for dark mode support, https://github.com/melishev/strapi-plugin-react-editorjs/issues/32 it now does support it, awaiting the PR to be merged ^^

devmnj commented 2 years ago

do you run the yarn build command ?

jared-leddy commented 2 years ago

do you run the yarn build command ?

I don't use yarn, but yes. I ran the npm run build command.

jonathan-chin commented 2 years ago

can confirm. after running yarn build, editorjs shows up. testing in light mode.

"@strapi/strapi": "4.1.12"
"strapi-plugin-react-editorjs": "^2.0.1"
thedualspace commented 1 year ago

It is really strange, I did yarn build after plugin install and nothing happened, rich text fields still showed MD editor. After that I uninstalled and cloned directly as local plugin. This way it worked. So I removed local plugin, installed via yarn, build, and again original MD editor... Than I switched to dark mode and from nowhere it was working, rich text editor was editorjs..I tried again to uninstall/install and was not able to reproduce it..I think we could close this issue and see if someone else report something similar, or it was just glitch on my local env...

I am having the same problem, but opposite.

When I install yarn add strapi-plugin-react-editorjs and run yarn build, I can use EditorJS.

But when try I use a local clone of this repo, I get the default strapi editor. I can see the plugin listed in the plugins tab however? I need to use the local version because I need to add an EditorJS plugin for math typesetting.

My config/plugins.ts file looks like

export default {
  editorjs: {
    enabled: true,
    resolve: "./src/plugins/strapi-plugin-react-editorjs",
  },
};

And I have run npm install within the repo clone also.

Any ideas?

thedualspace commented 1 year ago

This miraculously solved itself once I left to do something else, after an hour or more of troubleshooting... Can't help but wonder if some cache in webpack or something is to blame

chiwanpark commented 1 year ago

I am having the same problem. When I install with yarn add strapi-plugin-react-editor-js, The EditorJS does not appear. After cloning the repository and configuring the plugin with the following settings, the editor appears.

export default {
  editorjs: {
    enabled: true,
    resolve: "./src/plugins/strapi-plugin-react-editorjs",
  },
};

My dependencies list in package.json is as follows.

"dependencies": {
  "@strapi/plugin-i18n": "4.3.8",
  "@strapi/plugin-users-permissions": "4.3.8",
  "@strapi/strapi": "4.3.8",
  "pg": "^8.8.0",
  "strapi-plugin-react-editorjs": "^2.0.2"
}
b2storefront commented 1 year ago

EditorJS does not display in the Dark mode, light mode solves that issue however on the UX in Admin where multiple EditorJS instances are used it randomly not loading some and they are being displayed but collapsed.