GrapesJS Issues

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

829 issues found

๐Ÿ” question
#1995May 2, 2019by trafalmejo2 answers
0 reactions

[QUESTION] Binded events are not being loaded (Just work properly on mozilla firefox)

So I am using local Storage. I added some events to the component this way. Every time I add the component it works just fine. However, If I reload the page the component is still there but it is not triggering the click event or dblclick anymore. I noticed that this happens in Chrome and Safari browser. To solve this...

artf

You should add that code as a plugin

lock[bot]

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.

#1994May 1, 2019by webdeveloper04293 answers
0 reactions

[question] Is it possible to add StyleManager property for only class name

Thank for this awesome library. I am gonna to add style controller to sector. This style will be for only one class name and won't set target. For example ".xxx-wrapper div.active button:before" (xxx will be identifier of component so that inside buttons will be controlled by this sector) I tried to find in document b...

artf

No style manager can only change style properties (CSS) for any other thing you have to use Traits

webdeveloper0429

Thank you artf. so we can't use nested css selector (".xxx-wrapper div.active button:before") in cssCompose?

artf

You can create any CSS Rule by using setRule method but only class-based are visible in Style Manager

#1993May 1, 2019by Ramkumar-Murugesan3 answers
1 reactions

[QUESTIONS] is any way to store the html id with its component when i click save button

Hi. I know the grapesjs will generate the unique id for each HTML. when I store that HTML and CSS. the HTML id is not stored in my database. so when i reloaded my saved data into grapesjs it shows new unique id for each HTML element. before saving the HTML. we have id="i63ss1" as u can see in the below image but after...

artf

@maryia-kabash IDs are created when required (added component-related style, component has scripts, etc.)

artf

You shouldn't load the HTML/CSS but the JSON data Read this please https://grapesjs.com/docs/modules/Storage.html

maryia-kabash

@artf JSON doesn't have ids as well (you can see it on GrapesJS Demo page). Is there any way to force saving ids?

#1991April 29, 2019by afdallah3 answers
2 reactions

[QUESTIONS] resizable, using unitWidth in px output into percent.

Hi @artf, Thanks for making this amazing framework. Recently I made a custom component based on your flexbox plugin. The red arrow is the actual value of the model. The green arrow is what I expected to be. Is that possible to set unitWidth as px but the output to be percent? Here is what I've triedI separated them as...

artf

Ah wait, my fault, opts is the 3rd one updateWidth(model, value, opts = {}) { btw the second argument in setStyle are options (eg, { silent: true } to avoid triggering change listeners) and you get those options also in the callback of you...

afdallah

You are the man!!! ๐Ÿ‘ ๐Ÿ‘ Thank you so much @artf.

artf

Hi @afdallah, from the resizer point of view you'd need to use updateTarget option to customize the target but unfortunately, you can't as it already heavily used by the SelectCommand So I'd ask you to try to use this in your updateWidth f...

#1990April 29, 2019by Ramkumar-Murugesan2 answers
0 reactions

[QUESTIONS] need to call method before remove the html component

Hi, I need to call the method before remove the HTML component. how can I do that calling method like editor.on('block:drag:stop', function (model) {})

artf

lock[bot]

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.

#1989April 29, 2019by edward18932 answers
0 reactions

[QUESTIONS] Canvas in Modal

is it possible to make modal that can be a canvas? I want to make a button that displays modal, then I can add the modal component from the block manager, Thank's

artf

Probably you're looking for components with js

lock[bot]

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.

#1987April 27, 2019by fmr4113 answers
1 reactions

[QUESTIONS] Create toolbar in bottom

can I make a new toolbar that is located at the bottom (as shown by the cursor) when selected component? Thank's

afdallah

If you make that cell as a custom component, you can manipulate its View PS: this new syntax requires version 0.14.50+

fmr411

not only in the cell, but for all components

afdallah

Of course, you can apply the same technique to any component.

#1982April 26, 2019by fmr4113 answers
1 reactions

[QUESTIONS] addcomponent after the selected component

how do I make it possible to add new components after the component I selected, at this time I use editor.DomComponents.addComponent (block); , but new components are added at the end, not after the selected component, Thank you

artf

You can also use this to get the index of the component index = editor.getSelected().index()

fmr411

clear, I use index

lock[bot]

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.

#1981April 26, 2019by trafalmejo3 answers
0 reactions

[QUESTION] Modals open once

Hi all, I am using the plugins 'gjs-preset-webpage', and 'grapesjs-custom-code'. I have noticed that the import modal and the custom-code modal are opening just once. I have tried last versions for Mozilla and Chrome but this is not solving the issue. Once they open and close once, I am not able to open them again. I...

artf

Thanks for the report, this is actually due to the breaking change in https://github.com/artf/grapesjs/releases/tag/v0.14.55 I didn't manage well the state of those commands, I'll try to release soon the patch for both

artf

Fixed released https://github.com/artf/grapesjs-preset-webpage/releases/tag/v0.1.11 https://github.com/artf/grapesjs-custom-code/releases/tag/v0.1.2

lock[bot]

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.

#1977April 25, 2019by Ramkumar-Murugesan2 answers
0 reactions

[QUESTION] gjs-component is not updated with my traits values

Hi, have I modified my HTML using the toHTML function in traits. An HTML element is updated but the gjs-component is not updated still it shows the old code. my traits are but its shows older code like type="radio" is not stored in gjs-component after i loaded my saved screens before saving the screen after saved and...

artf

I barely understand you here... please provide a reproducible demo

lock[bot]

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.