GrapesJS Issues

Search parsed GitHub issues, see highlighted answers, and open the original discussion when needed.

3464 issues found

#3009September 8, 2020by BillTheGoat3 answers
3 reactions

BUG: Restricting Drop on Wrapper Component

Version: 0.16.22 Are you able to reproduce the bug from the demo? [ ] Yes [ X] No - requires editing js. What is the expected behavior? wrapper component should not be droppable once droppable attribute is set to false. What is the current behavior? Nothing happens when this attribute is set. Describe the bug detailed...

RJCAM

Hi @BillTheGoat try this after init:

RJCAM

I think it's because the wrapper doesn't make part of DomComponents. DomComponents are only the components inside of the wrapper. :smile:

BillTheGoat

Hmmm. I tried this because the API docs list the DomComponents.getWrapper() as its first function, and it does apply attributes as seen in my sandbox above. It was doubly odd to me because it seems like the editor.getWrapper() function is...

#3008September 7, 2020by trony20203 answers
0 reactions

Center a Div and resizable borders

1) How to center a div inside a div in the Layer Manager? What button i must use? 2) How to make appear the resizable borders for a block? thanks!

artf

How to center a div inside a div in the Layer Manager? What do you mean?? which div?How to make appear the resizable borders for a block? A block or a component?

trony2020

Hi,What do you mean?? which div? Inside a Block we have many div nested or not, selecting one div and press some button to center it in the father divA block or a component? Block

artf

Please, read the documentation first https://grapesjs.com/docs Avoid mixing terminologies like blocks/layers because from my point of view what I'm reading doesn't make any sense

#3007September 7, 2020by KishanRavindran1 answer
1 reactions

BUG: I am not able to drag and drop a component outside form getting a warning.

WARNING Version: 0.16.22 Are you able to reproduce the bug from the demo? [1 ] Yes [ ] No Not able to drag and drop the input or textbox or select from the forms block Whenever I drag and drop an input component I am getting the below When I try to drag and drop an input or any component except a form the drag and dro...

RJCAM

Hi @KishanRavindran that's not a bug, it's the default behavior of the editor. Check this issues #2812 and #2180 to see more info.

#3006September 7, 2020by ashercoren1 answer
0 reactions

BUG: Don't loop over objects with a for in loop

Version: 0.16.22 Are you able to reproduce the bug from the demo? [-] Yes [ ] No What is the expected behavior? Looping over objects should be done using Object.keys.forEach..., and not with a for-in loop. Looping over objects with a for in loop will include properties that are inherited through the prototype chain. T...

ashercoren

This caused a bug in our application since we are using some package that adds properties to the object prototype. When trying to initialize a grapes.js editor we get an error in the console.

#3005September 7, 2020by Davidvlv3 answers
1 reactions

BUG: Layer manager appendTo is duplicating the layers every time grapesjs is init

Version: 0.16.18 and up (The issue was introduced somewhere after 0.15.3, not sure when) Are you able to reproduce the bug from the demo? [x] Yes [ ] No What is the expected behavior? On grapesjs.init() the layers manager with appendTo should replace the layers with a new one What is the current behavior? When grapesj...

artf

mmm honestly I don't see how that might have worked previously but I'll fix it in the next release

RJCAM

Hi @Davidvlv your appending the layers outside the "gjs" div element so you can see that when you remove the grapesjs editor (with the remove button) the layers panel stills there because like you're doing it you're separating the editor f...

Davidvlv

Thanks @RJCAM , I can see how to patch it. The issue is that this was not the previous behaviour before I upgraded from 0.15.3 to 0.16.18 - it used to handle appendTo fine when re-initializing. So I am still of the opinion that this is a b...

#3004September 5, 2020by Bakino2 answers
0 reactions

QUESTION : custom style properties to change class

Hi, Thanks for this good editor. In my project, I want to adjust classes of components using the style manager. For example, I am using bootstrap and I want the user to be able to apply classes such as bg-danger, bg-primary from a drop box instead of input the class name manually. I am aware that I can do it using tra...

artf

There is an option which allows you to indicate which target to select (classes or component-specific style) https://github.com/artf/grapesjs/pull/2474 (in your case componentFirst should be disabled) Unfortunately, the selector manager's...

Bakino

thanks for your answer :)

#3002September 4, 2020by jcamejo2 answers
0 reactions

BUG: CSS Properties are not correctly loaded if style manager panel is not active at initialization

Hi @artf! Let me describe the issue Version: 16.22 What is the expected behavior? The css property values and visibility settings should take the correct configuration Describe the bug detailed If the style manager is not active on editor load, when you click on an element and open the style properties, they are not u...

artf

I guess we have to call checkVisibility also in render (probably before onRender call)

artf

I'm closing this one as I'd expect this to be fixed from v0.18.*

#3001September 4, 2020by pjdevries3 answers
2 reactions

The dreaded 'confirm that you want to leave' dialog.

For the time being mostly ad a hobby project, I'm attempting to integrate GrapesJS in Joomla! as an editor plugin. The way most editor plugins are implemented in Joomla!, is by using a <textarea> to get the editor data saved like any other <form> field. I have a basic proof of concept that works; data is loaded and sa...

Ju99ernaut

#2805

pjdevries

@artf Apologies!

artf

@pjdevries next time reply in your own issue and close it if it's solved, thanks :)

#3000September 4, 2020by alemenciones2 answers
0 reactions

How to remove a style rule of CssCompoer?

Hi man, im trying to remove a style-rule, some antithesis of CssComposer.setRule(".selector") ? Thanks you very much!

longdoan7421

Unfortunately, GrapesJS does not have any built-in function like CssComposer.removeRule. However, you could do that with a workaround like this:Get all rules by using CssComposer.getAll(), it will return you a Backbone Collection of all ru...

artf

@longdoan7421 is correct but in the second solution I'd use CssComposer.getRule directly

#2999September 3, 2020by jenter3 answers
0 reactions

Drag Sorting issues in Web Component with Shadow Dom disabled

Version 16.10 Are you able to reproduce the bug from the demo? [X] Yes [ ] No What is the expected behavior? That GrapesJS can support dragging & sorting interaction with custom Web Components which do not have the Shadow DOM enabled. Describe the bug Hello, we use GrapesJS extensively and integrate many of our custom...

artf

This bug/request isn't just for StencilJS, but just in general with Web Components and the Shadow DOM. Are there best practices with Grapes and Web Components with enabling or tracking events to mediate these issues? I'm not working with W...

jenter

@artf sure thing, thanks for the quick response. I have imported my custom web component library here in this Fiddle to demonstrate the issue: https://jsfiddle.net/jenter77/5btn2ao7/25/ If you reference my public repo and example "faux-gri...

artf

Hi Jason, I've tried to give a look at what is happening inside the editor and, I'm not sure how the shadow option actually affects this behavior but, the main issue I see is that dynamic <div class="delayed--wrapper"> element. Basically t...