Grapesjs: Blocks Manager in GrapesJS Not Working For Columns

Created on 19 Nov 2017  路  12Comments  路  Source: artf/grapesjs

Hello,

My installation of GJS ties in all of the default blocks. Every block drags fine onto the page with the exception of all the "columns". i.e: 1,2, and 3 columns. When I drag them.. it does nothing.

What should I do?

Brandon

help wanted outdated

Most helpful comment

Okay I'll get that working and do a PR

All 12 comments

I see in the inspector that the "row" css class is non-existent. I checked the demo and see that the "row" css class is put in dynamically into the "gjs-css-rules" block.

@brandonburr86 about what demo are you talking about?

Hey @brandonburr86 try to reset the cache of your browser and retry because I don't see any error
blocks

I've stumbled upon this issue as well. It has to do something with the browser cache since re-launching the page in a private mode window fixed it.

No the demo works fine, but it doesn't work in my app. Here is a screen capture video of the issue.
GrapesJS issue video

Also I did try clearing the cache and launching my app in private mode. Still didn't work.

I think the source of the issue is the basic block plugin
https://github.com/artf/grapesjs-blocks-basic/blob/master/src/index.js#L28
those styles should be placed inside their relative blocks and not outside via editor.addComponents.
I'd really appreciate a PR :)

Okay I'll get that working and do a PR

I am not sure if anyone still has this issue, but I experienced this issue and found that the problem is caused by loading blank CSS.
So lets say we have a variable:
var LoadCSS = '';
and you call
editor.setStyle(LoadCSS);
This will cause the columns not to display when you drag them to the canvas even though they are loaded when you look at the code.
The fix is simple, just do a check if the LoadCSS var actually has a value before using setStyle();

I hope this helps.

Should be fixed with latest versions of grapesjs-blocks-basic

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Geczy picture Geczy  路  3Comments

Snarkly picture Snarkly  路  3Comments

adam-gpc picture adam-gpc  路  3Comments

desilvaNSP picture desilvaNSP  路  3Comments

kickbk picture kickbk  路  3Comments