mjawad096 / laravel-grapesjs

This package provide an esay way to integrate GrapesJS into your laravel proejct.
MIT License
107 stars 54 forks source link

Custom templates and blocks are not showing in the editor #73

Open JerrelZ opened 1 year ago

JerrelZ commented 1 year ago

Hi!

First of all, thanks for building this great package.

I'm trying to add custom templates and blocks by added them to the 'resources/views/vendor/laravel-grapejs/templates' and 'resources/views/vendor/laravel-grapejs/gjs-blocks' folders, but somehow they aren't showing in the editor.

Even the two files that were already there (named example.blade.php) aren't showing.

Any idea what I'm doing wrong?

Thanks.

XFAISAL commented 1 year ago

👍

ghost commented 1 year ago

@JerrelZ please look at this section in the readme and let me know if this has not helped you.

dyoh777 commented 1 year ago

I have the same issue.

emincer commented 1 year ago

I have the same issue.

emincer commented 1 year ago

@JerrelZ please look at this section in the readme and let me know if this has not helped you.

This is a Slack link. I don't have access to your workspace.

ghost commented 1 year ago

Apologize, I've updated the link. Review now and let me know if it doesn't resolve your problem.

XFAISAL commented 1 year ago

still blocks and templates not working

emincer commented 1 year ago

still blocks and templates not working

From what I can tell, templates fail to show if they include Laravel directives and possibly Tailwind, which would make it useless for me. I'm not entirely sure but I can get at least get Blocks to show up but only if they are vanilla HTML. Hopefully @jd-dotlogics can look into this. Should Laravel directives and Tailwind work?? Also, where are buttons and other elements in the edit panel??

Screenshot 2023-03-21 at 10 31 35 AM
favouraka commented 1 year ago

I had this this issue a while ago and I found out that when two blade files with similar names were in the resources/views/vendor/laravel-grapejs/gjs-blocks or resources/views/vendor/laravel-grapejs/templates directories, this issue would occur.

I tried giving each block and template unique names with kebab-case naming convention and it was fixed. I hope it also works for you.