Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to see custom block in editor #17

Open
Shamim-Aktar opened this issue Mar 23, 2020 · 7 comments
Open

Not able to see custom block in editor #17

Shamim-Aktar opened this issue Mar 23, 2020 · 7 comments
Labels
question Further information is requested

Comments

@Shamim-Aktar
Copy link

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

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

Shamim-Aktar commented Mar 23, 2020

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

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

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

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

@SofiaSousa SofiaSousa added the question Further information is requested label Mar 23, 2020
@Shamim-Aktar
Copy link
Author

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

@chrishappy
Copy link

Related front/create-cloud-block#4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants