laravel-grapesjs icon indicating copy to clipboard operation
laravel-grapesjs copied to clipboard

Custom templates and blocks are not showing in the editor

Open JerrelZ opened this issue 1 year ago • 9 comments

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.

JerrelZ avatar Mar 05 '23 18:03 JerrelZ

👍

XFAISAL avatar Mar 13 '23 10:03 XFAISAL

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

ghost avatar Mar 13 '23 10:03 ghost

I have the same issue.

dyoh777 avatar Mar 17 '23 16:03 dyoh777

I have the same issue.

emincer avatar Mar 20 '23 18:03 emincer

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

emincer avatar Mar 20 '23 18:03 emincer

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

ghost avatar Mar 21 '23 05:03 ghost

still blocks and templates not working

XFAISAL avatar Mar 21 '23 16:03 XFAISAL

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

emincer avatar Mar 21 '23 17:03 emincer

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.

favouraka avatar Jun 16 '23 09:06 favouraka