Skip to content
This repository has been archived by the owner on Dec 23, 2023. It is now read-only.

Strapi Not Showing Editor.js #31

Open
jared-leddy opened this issue Apr 5, 2022 · 20 comments
Open

Strapi Not Showing Editor.js #31

jared-leddy opened this issue Apr 5, 2022 · 20 comments

Comments

@jared-leddy
Copy link

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
Copy link
Owner

melishev commented Apr 5, 2022

Hello @jared-leddy .

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

@melishev
Copy link
Owner

melishev commented Apr 6, 2022

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

@melishev melishev closed this as completed Apr 6, 2022
@jared-leddy
Copy link
Author

jared-leddy commented Apr 6, 2022

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

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

@bavicj
Copy link

bavicj commented Apr 7, 2022

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

@bavicj
Copy link

bavicj commented Apr 7, 2022

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

@jared-leddy
Copy link
Author

@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
Copy link
Author

jared-leddy commented Apr 7, 2022

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

strapi/strapi#13085

@jared-leddy
Copy link
Author

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

@melishev melishev reopened this Apr 8, 2022
@melishev
Copy link
Owner

melishev commented Apr 8, 2022

@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
Copy link
Author

jared-leddy commented Apr 8, 2022

@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
Copy link

bavicj commented Apr 8, 2022

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
Copy link

dcakmak commented Apr 16, 2022

same problem here...

@kgrosvenor
Copy link

I've added some work for dark mode support, #32 it now does support it, awaiting the PR to be merged ^^

@devmnj
Copy link

devmnj commented Jun 7, 2022

do you run the yarn build command ?

@jared-leddy
Copy link
Author

do you run the yarn build command ?

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

@jonathan-chin
Copy link

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
Copy link

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
Copy link

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
Copy link

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
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants