GrapesJS Issues

3,464 parsed GitHub issues โ€” 370 solved ยท 90 open. Search, filter and explore battle-tested answers.

644 issues found

๐Ÿ” components
#2456December 12, 2019by varadero3 answers
2 reactions

[QUESTION] (Possibly a bug) How to apply traits to components used for GrapesJs initialization

I am using This works but only for blocks which are added/drag-dropped to the editor manually after it is initialized. If we supply components when we call grapesjs.init({..., components: [..]}), the components defined in components do not have the traits. How can we apply traits to initially loaded components too, no...

artf

currently there is a problem on storing custom types unless they are defined inside a plugin. Not a problem ๐Ÿ˜ฌ, you just need to load custom types before the content and using plugins is the only wayI can't add all possible such elements a...

varadero

This is how it can be reproduced:Go to https://jsfiddle.net/nwsy6mv1/3/Open blocks and place "1 Column" blockClick inside the column and go to "Settings"You will see the drop-down trait with label "Trait label"At this time the grapesjs com...

pouyamiralayi

Hi @varadero please define your custom type as a plugin. cheers!

#2441December 3, 2019by bpwme2 answers
1 reactions

[QUESTION] How to completely disable badges on hover?

Hello, I've been looking to completely disable the badges that appear on hover, but I can only seem to disable it fro the wrapper with the following code: domComponents: { wrapper: {badgable: false} }, Is there a similar way to completely disable them? Thanks in advance!

fredrickreuben

You can use canvas: { customSpots: { hover: true }, },

artf

Probably in your case the easiest solution would be to hide it via CSS

#2440December 2, 2019by edwinjoel19843 answers
1 reactions

Resize by class :(

The main problem that i have is I'm trying to do a resize in a component that I made, but if I have Two Components equals, when I do the resize one of them the other do the same resize. So, I think that I would need manage the style of them by id and not by class. This is my code: const buttonComponent = { name: "butt...

pouyamiralayi

@ramusesan @edwinjoel1984 your issues is because of the shared selectors. similar issue here. for the solution i suggest this thread. cheers!

edwinjoel1984

@artf this is the problem

ramusesan

even i am facing the same issue its probably issue with precedence, assume incase i have an id and class for the same element i.e <table id="myId" class="myClass"> ..... </table> and trying to resize a table then styles are applying on .my...

#2435November 29, 2019by edwinjoel19842 answers
0 reactions

Styles by ID in components

How do I make the styles of the components I take them by id and not by class

artf

You can toggle classes, this will change the style selector

edwinjoel1984

The main problem that i have is I'm trying to do a resize in a component that I made, but if I have Two Components equals, when I do the resize one of them the other do the same resize. So, I think that I would need manage the style of the...

#2434November 29, 2019by pvbergen2 answers
1 reactions

[Question] Exclude html elements from model

This is a broad question, so I will provide the use case and some ideas instead of actual code.Basic description We are using grapesjs as part of a Drupal module (https://github.com/artf/grapesjs/issues/1798#issuecomment-559498604) and we are facing an issue with having too many html elements within the grapes contain...

pvbergen

Huh, that would be surprisingly simple. Thanks! I'll test it out in the next few days and see how we can integrate it with our workflow.

artf

Do you mean something like this? This will add an HTML without being actually related to GrapesJS Components

#2432November 28, 2019by digitalgym1 answer
0 reactions

Lock Trait Values

QUESTION: Is it possible to lock a trait value so that it cannot be updated in the editor for select components?

artf

Not really, probably the best solution here would be a simple pointer-events: none with CSS

#2426November 25, 2019by Hovius2 answers
3 reactions

[Question] How to handle old components (json) with new editor configuration?

Hello @artf , I have a question about the grapes editor that I can not find in the documentation, so I hope you have an answer. Basic setup: The configuration of all components is set with the init this.editor = grapesjs.init(defaultConfiguration); The components from an earlier saved json are added with setComponents...

artf

Can the editor pick up on the new component config without having to add a new component to the canvas manually? Not really, if you store the component definition in one way, the editor will load that definition. One only thing I can sugge...

Hovius

Thanks for your response! I'm going to use avoidDefaults: true and make it work :)

#2423November 23, 2019by MartinPutz2 answers
0 reactions

[BUG] In absolute dragmode the components are not dropped properly if zoom is applied

Components are not dropped to the exact position if dragmode set to absolute and there is a zoom value applied on the canvas. GrapesJS version:0.15.8 The issue can be reproduced in the demo as well: https://jsfiddle.net/y8m1x4a3/ Expected behavior: Components can be dropped to the cursor position even if the dragmode...

artf

Should be fixed in this branch https://github.com/artf/grapesjs/tree/multi-frame Multi framing is still far from being complete but I hope to merge soon that branch (big canvas refactoring but without breaking changes), definitely not for...

artf

I close this issue as I'm planning to solve all ones related to absolute positioning here: https://github.com/artf/grapesjs/issues/3770