strapi-plugin-react-editorjs icon indicating copy to clipboard operation
strapi-plugin-react-editorjs copied to clipboard

Strapi Not Showing Editor.js

Open jared-leddy opened this issue 3 years ago • 20 comments

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.

jared-leddy avatar Apr 05 '22 04:04 jared-leddy

Hello @jared-leddy .

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

melishev avatar Apr 05 '22 07:04 melishev

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

melishev avatar Apr 06 '22 21:04 melishev

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

  "dependencies": {
    "@strapi/strapi": "4.1.7",
    "strapi-plugin-react-editorjs": "^2.0.0",
  }

jared-leddy avatar Apr 06 '22 21:04 jared-leddy

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

bavicj avatar Apr 07 '22 18:04 bavicj

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

bavicj avatar Apr 07 '22 18:04 bavicj

@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 avatar Apr 07 '22 19:04 jared-leddy

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

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

jared-leddy avatar Apr 07 '22 22:04 jared-leddy

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

jared-leddy avatar Apr 07 '22 23:04 jared-leddy

@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?

melishev avatar Apr 08 '22 00:04 melishev

@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

jared-leddy avatar Apr 08 '22 00:04 jared-leddy

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...

bavicj avatar Apr 08 '22 06:04 bavicj

same problem here...

dcakmak avatar Apr 16 '22 18:04 dcakmak

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 ^^

kgrosvenor avatar Apr 23 '22 11:04 kgrosvenor

do you run the yarn build command ?

devmnj avatar Jun 07 '22 11:06 devmnj

do you run the yarn build command ?

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

jared-leddy avatar Jun 07 '22 14:06 jared-leddy

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"

jonathan-chin avatar Jun 22 '22 15:06 jonathan-chin

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 avatar Sep 09 '22 13:09 thedualspace

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

thedualspace avatar Sep 09 '22 13:09 thedualspace

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"
}

chiwanpark avatar Sep 18 '22 12:09 chiwanpark

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.

b2storefront avatar Jul 06 '23 10:07 b2storefront