front / g-editor

A minimalist version of the Gutenberg editor
MIT License
189 stars 40 forks source link

Not able to see custom block in editor #17

Open Shamim-Aktar opened 4 years ago

Shamim-Aktar commented 4 years ago

Hi SofiaSousa

I run your code successfully But I am not able to see my custom block in guttenberg editor. Help me and guide me the step to get my output after npm start.

SofiaSousa commented 4 years ago

Hi @Shamim-Aktar

Have you tried the BLOCK_DIR=\absolute\path\to\your-custom-block npm start command (using the correct absolute path to your block)?

Shamim-Aktar commented 4 years ago

No I am not getting where is it? Please tell me where I can use this please tell me filename after using this facing issue BLOCK_DIR is not recognized as internal or external command

SofiaSousa commented 4 years ago

You can get that instruction in readme file:

You can include your custom block by passing its path in BLOCK_DIR env var.

BLOCK_DIR=\absolute\path\to\your-custom-block npm start

Shamim-Aktar commented 4 years ago

BLOCK_DIR=\absolute\path\to\your-custom-block npm start I include this but still not able to see My Custom block in guttenberg editor after successfull run of server

SofiaSousa commented 4 years ago

From the beginning:

  1. You can install g-editor and run it executing the following commands in your command line:

    npm install @frontkom/g-editor
    npm start
  2. If you want to add your custom block to the editor, you have to set the BLOCK_DIR environment variable with the path of the root of your custom block before you start g-editor.

Make sure your block has the following files structure:

your-custom-block
  ├── ...
  ├── build
  │  ├── index.js
  │  └── style.css
  └── ...

If your custom block lives at /Users/your-user/Workspace/your-custom-block directory, use the following command to start the editor:

BLOCK_DIR=/Users/your-user/Workspace/your-custom-block npm start

In Windows:

set BLOCK_DIR=/Users/your-user/Workspace/your-custom-block
npm start

Hope this helps you.

Shamim-Aktar commented 4 years ago

I followed your instruction application is running but Block is not showing on guttenberg editor

chrishappy commented 3 years ago

Related https://github.com/front/create-cloud-block/issues/4