dimitrov-adrian / directus-extension-editorjs-interface

Block editor (Editor.js) interface for Directus 9
https://www.npmjs.com/package/directus-extension-editorjs
GNU General Public License v3.0
182 stars 40 forks source link

Install and use the interface #16

Closed danieljwestman closed 2 years ago

danieljwestman commented 3 years ago

Nice to test out editor.js in Directus 👍🏻

However, I can't get it to work on my Directus instance (v9.0.0-rc.95)...

  1. Downloaded a copy of your repo
  2. Run npm install in the editorjs dir
  3. Run npx directus-extension build
  4. Moved the index.js file to extensions/interfaces/editorjs
  5. Started up Directus, npm run dev
  6. My other extensions are loaded properly, but editorjs doesn't seem to be loaded
  7. Created a new JSON field, but editorjs (Blocks) isn't an interface option, no where to be found...
dimitrov-adrian commented 3 years ago

I had tried exact same steps and it works.

Do you see it loaded in Loaded extensions: when starting Directus?

What is your setup, npm installation (version) or with docker?

danieljwestman commented 3 years ago

@dimitrov-adrian Loaded extensions: only includes my other extensions, not editorjs

I'm running a Directus clone locally (latest commit).

dimitrov-adrian commented 3 years ago

It's funny, but in local build of directus I do not get Loaded extensions: in console. Anyway, tried to install on latest from main, and it seems to works, but needed to restart directus few times.

danieljwestman commented 3 years ago

Okay, weird. Testing with fresh Directus install and fresh download of editorjs extension with no luck...

dimitrov-adrian commented 3 years ago

What is your nodejs version, and what os?

danieljwestman commented 3 years ago

v.16.0.0 MacOS Catalina / Big Sur

dandamian commented 2 years ago

Clearing the browser cache helped in my case.

dimitrov-adrian commented 2 years ago

Still cannot reproduce.

npm package works for me, also using the https://github.com/dimitrov-adrian/directus-extension-editorjs-interface/releases/download/v1.0.1/index.js (from releases downloads) and putting into extensions/interfaces/editorjs/index.js works too.

I'll keep this open, if any other has such issue too.

danieljwestman commented 2 years ago

@dimitrov-adrian Okay...

I managed to install the extension with npm install directus-extension-editorjs and the it gets loaded when starting up. But how do I add the interface to a field? I can't find it...

Skärmavbild 2021-11-29 kl  15 05 18

Screenshot of Start Page

Screenshot of Start Page (1)

danieljwestman commented 2 years ago

Am I missing something @dimitrov-adrian ?

dimitrov-adrian commented 2 years ago

Actually no, I am trying to reproduce. Tried on Directus from docker and with local npm install, and on different browsers (Chrome, Safari and Firefox) but none of this make me missing the interface. I am out of ideas.

danieljwestman commented 2 years ago

You are using the old field creation flow? Could you attach a screendump?

dimitrov-adrian commented 2 years ago

https://user-images.githubusercontent.com/1009639/144491141-5b598aea-fd1a-403a-ab30-3b7e98ffbe38.mp4

Yes, in advanced field flow

dimitrov-adrian commented 2 years ago

Just added it to the new field flow (with 1.0.2)

danieljwestman commented 2 years ago

Thank you very much.

Suddenly it works for me too (with 1.0.2) 😅

Have a nice weekend!