GrapesJS Issues

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

1180 issues found

#2948August 10, 2020by mmotov3 answers
1 reactions

[Question/Bug]: The image in the cell shifts the content

Hello! I Have an issue, when adding an image in cell, the neighbors cell content is 'jumping' to the bottom. Actually this issue not only with image, but also with video, links etc. Here is how it looks without image: And now with image: Any idea what it might be and how to fix it?

Ju99ernaut

I'm able to reproduce that behavior with default grid But when I turn on flex-grid it functions as expected Probably have to replace all previous instances of the component that use display: table, but I don't think that is necessary since...

Ju99ernaut

Probably related to display: table, the grid system uses by default, add this to your grapesjs.init

mmotov

@Ju99ernaut thanks for reply, but unfortunately it didn't help. I managed to solve this issue by overriding default Cell component. I have added But probably I'm doing something wrong

#2947August 9, 2020by Starbors1 answer
1 reactions

BUG: Blocks dont show when you download the files

Hi lm not sure if this is a bug BUT when you download the file You can only use "Block" To add elements to the project,is it just me or is this for everyone let me know

Ju99ernaut

Other blocks are separate plugins...you can find links to them in the README of the repo

#2943August 7, 2020by Joshmamroud3 answers
1 reactions

BUG: this.get('content') returns empty string when trying to add custom component type

Version: 0.16.18 Are you able to reproduce the bug from the demo?>> Demo <<< [ X ] Yes [ ] No What is the expected behavior? Expecting this.get('content') in the context of the model while creating a new component type (extending the default component type) should return the children as HTML. Describe the bug detailed...

artf

No, content property is only used in components like Text/Textnode. Replace your this.get('content') with this.components().map(comp => comp.toHTML())

Joshmamroud

@artf does this look like a bug or am I doing something wrong?

DmitryTar1

@artf does this look like a bug or am I doing something wrong? May be try model.components() insead of content

#2938August 4, 2020by tranthanhhoa2 answers
3 reactions

BUG: "display" property of Style Manager doesn't sync with Layer Manager

Version: v0.16.18 How to reproduce:Select a componentChoose Layer tabHide componentBack to Style tabCheck "display" property Expected:"display" should be "none" Actually:"display" is still "block"

artf

Will be fixed in the next release. Thanks

Ju99ernaut

The StyleManager doesn't seem to update when styles are changed from somewhere else...the display property does get updated once you deselect and select the component again. Probably the StyleManager needs to updated to listen for changes...

#2934August 3, 2020by jayeshmotwani2 answers
2 reactions

BUG: Changing the font inside top panel is disturbing the font-awesome icons

Hello, I am using Montserrat google font. Ater trying so many things, finally I was able to set the font using following way: .gjs-pn-buttons > span{ font-family: "Montserrat", sans-serif; } But when I do this, the font is changed but the font-awesome icons are not working. Please refer the following screenshot for mo...

mcottret

Hi @jayeshmotwani ! Font Awesome relies on the font-family attribute for its icons, & since your selector also targets these icons in addition to the text, Font Awesome's font-family gets overridden by yours, which breaks its icons. I'd re...

jayeshmotwani

@mcottret Thanks for your reply. I fixed this by adding the label text inside a tag and given my custom font to that particular tag only, instead of entire <span> of button. Cheers!

#2928July 29, 2020by tranthanhhoa3 answers
2 reactions

BUG: Select the initial background color doesn't work

Version: 0.16.18 Bug: Select the initial background color is not working How to reproduce it: https://imgur.com/xqkt46E Actually:Component's background does not changes. Expected:Component's background should change to #000000 Thanks @artf !

mcottret

Hi @tranthanhhoa & @RJCAM, The bug indeed only appears when specifically selecting a background color value of #000000. Tracking it down, it is due to the background-color property's default value of 'none' being set as '' by the color inp...

RJCAM

@tranthanhhoa I'm not able to reproduce this bug in the demo (same as you), it's working fine here, check this: What did you do before?

tranthanhhoa

background-color property's default value to transparent worked for me. Thank you so much @mcottret !

#2921July 27, 2020by Davidvlv3 answers
4 reactions

BUG: Autosave not working on style manager when classes are disabled

Version: 0.16.18 Are you able to reproduce the bug from the demo? [x ] Yes: https://jsfiddle.net/ju1a0onx/ What is the expected behavior? Autosave should always call the "store" command after a style change, even when the classes are disabled What is the current behavior? When you disable all classes on an element (Or...

artf

Thanks for the report, there is a bug with the editor.load method, which could be currently patched in this way Actually, if you have used editor.load() only because it doesn't load on start, that because you have to define your custom sto...

Joshmamroud

@Davidvlv I'm experiencing the same issue. I believe it's a combination of the avoidInlineStyles: 1 in the config and no class being selected. It seems to work as expected with avoidInlineStyles: 0

Davidvlv

I've tried it out, and that setting does stop it from not saving when it should, but it introduces some other issues on our end with how we're using the output later on. We turned on avoidInlineStyles to avoid these issues.

#2919July 26, 2020by BerkeAras2 answers
1 reactions

BUG: Custom Blocks are wrapped into a div

Version: 0.16.18 Are you able to reproduce the bug from the demo? [X] Yes: https://codesandbox.io/s/empty-night-8q733?file=/index.js [ ] No What is the expected behavior? The Element "Link Button" should not be in a div. There should not be a div, just a 'a' tag What is the current behavior? Custom blocks are wrapped...

mcottret

Hi @BerkeAras ! As shown on the Getting Started page, you can specify a tagName property when defining custom Blocks & Components to override the default div tag. Cheers !

artf

You're passing a description for a component (<div> as default) and then adding inner content (<a> tag) to that component

#2918July 25, 2020by neon123453 answers
0 reactions

BUG: textnode is not removed from canvas

Text imported directly to the wrapper is not removed from the canvas with the component. To verify one can import simple texts multiple times to the demo and watch how they combine instead of replacing the previous one. Adding this seems to help: editor.DomComponents.addType('textnode', { model: { removed() { var el =...

artf

I don't follow your example, can you illustrate exact steps to reproduce, please?

neon12345

Go to the newsletter demo at https://grapesjs.com/demo-newsletter-editor.html and use the "Import template" function with simple text like "hello" but no html (or combine it with html and text on the root level). Repeat this and the text o...

artf

Thanks @neon12345, I was able to find the issue and it should be fixed in the next release

#2917July 24, 2020by cartifon3 answers
2 reactions

BUG: Style Manage does not hide style blocks

Hey @artf, I'm trying to hide style properties based on the selected element. for example, when I drag and drop an image on my GrapesJS, I would like to show only the width property, but the unstylable/stylable attributes are not working. Version: "grapesjs": "^0.16.18", Are you able to reproduce the bug from the demo...

mcottret

Hi @cartifon ! I believe the stylable attribute only works on Components & not Blocks as in your example. The following should do the trick: Cheers !

cartifon

I have another question, would the unstylable work in the same way?

cartifon

Hey @mcottret, thanks for the help. Yes, it does work with that! Maybe the documentation should be more clear on that.