GrapesJS Issues

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

3464 issues found

#2840June 19, 2020by tonypartridge1 answer
2 reactions

Body background color/image not saving?

When I set the color or background image on the body it does not appear to save within the html/css/components. Is there a trick to get the background canvas to save? See attached for example. <img width="1345" alt="Screenshot 2020-06-19 at 08 01 56" src="https://user-images.githubusercontent.com/1400982/85105890-2e52...

tonypartridge

avoidInlineStyles: 1 resolves it.

#2839June 19, 2020by akashdesale981 answer
0 reactions

[Question] I added one component named template in the blocks but when i try to drag another components inside this template component ,it will be dragged but after saving it removes all the components inside it. How to avoid this?

This is code of template component: I debugged it, so i got that : setComponents method in the dom_components clearing it ...but not getting why it is removing? setComponents calls clear method which is responsible for removing elements inside it I commented this so it was working fine and persisted the components ins...

artf

<template> tag should be treated differently #244

#2838June 18, 2020by levansuper3 answers
1 reactions

Style sections are duplicated

Hello Guys I'm using: "grapesjs": "0.16.12", "grapesjs-preset-webpage": "0.1.11", and in the css edit area i get this strange behavior: <img width="1527" alt="Screen Shot 2020-06-19 at 00 39 13" src="https://user-images.githubusercontent.com/223112/85069933-01cbdd00-b1c6-11ea-909b-7b77a048eefe.png"> a lot of the secti...

levansuper

@artf in my case the problem was that i was loading the module using node not directly in html. In the end I found and answer:

artf

Hi Levan, please try to follow the template from the preset page https://github.com/artf/grapesjs/blob/gh-pages/demo.html

etamity

@artf in my case the problem was that i was loading the module using node not directly in html. In the end I found and answer: I found out if you pass styleManager: { clearProperties: 1 } to GrapesJS also will resovle the problem

#2837June 16, 2020by tyrp1 answer
0 reactions

Broken example in docs

The sandbox linked at the bottom of this section doesn't render anything. "A complete example of this approach can be found here" There are no console errors, not sure if something was deleted or why this isn't working.

artf

Sandbox is updated so it should've been fixed.

#2836June 16, 2020by RJCAM1 answer
1 reactions

[BUG]: Unable to add class when adding Dom Component

GrapesJS Version used: 0.16.12 (current) Just a strange behavior, I can add all the attributes I want when adding component directly inside canvas using dom components add function (like code below) but the editor always remove the class. The class is only added if we create the component first and then assign a class...

artf

Yeah, you have to use classes property, but I agree that is confusing (that because classes are treated a bit differently), so I'll try to make the initialization possible also with attributes.class value

#2835June 16, 2020by letstri1 answer
1 reactions

[BUG] Outside Shadow type is not applied

Got to https://grapesjs.com/demo.htmlSelect any itemAdd box-shadowSet box-shadow to insideSet box-shadow to outside Video: https://take.ms/9aFjz

artf

@BrooonS thanks, I'll check it out

#2834June 16, 2020by kuhelbeher3 answers
6 reactions

[BUG] Grapesjs doesn't initialize styles for wrapper

Hello, I've met a bug where grapesjs doesn't initialize styles for wrapper. Steps to reproduce:Go to https://grapesjs.com/demo.html Select wrapper and set background. It will add "body" rule to styles and it will be displayed in style settingsRefresh the page - "body" rule still present (you can check it in "View Code...

bryanjamesmiller

This seems to fix the issue: Any reason not to do this @artf ?

Jowcey

Hey, this issue is still persisting. The Classes and CSS added to the body layer (wrapper) get wiped every time it's restarted. It seems to be that the ID get's randomised and that's why the CSS breaks, but unsure why the class gets cleare...

aakash2610

I am facing the same issue. Is there any workaround for this issue suggested by grapesjs team? Meanwhile, is there any timeline for fixing this issue?

#2833June 16, 2020by jpdigital1 answer
0 reactions

[Questions]: How to add a toolbar to a component?

Hello, I would like to extend the table component with a toolbar for adding and removing columns and rows. As far as I understood the documentation and the code the function onActive should be triggered when a component is selected. Or did I misunderstood this function? Because when I try to extend the view of the tab...

artf

Check here https://github.com/artf/grapesjs/issues/266

#2832June 15, 2020by mbaird41 answer
0 reactions

Replace/Override template for CategoryView?

Hi, Wondering if it's at all possible to use custom HTML to replace the CategoryView's template when adding a new block? I've tried a couple things, but just based on the source code, I'm not seeing a way.

artf

No, unfortunately, it's not possible but you can always create your own blocks container and using HTML5 D&D to drop stuff Here you can find an example https://github.com/artf/grapesjs/issues/2595#issuecomment-593699277

#2831June 15, 2020by mustahsanmustafa2 answers
1 reactions

[BUG] Text components don't behave correctly after creating custom components

Hi artf, After creating custom components, the text component does not behave like before. It removes all the naked nodes after changing some code in import modal. e.g After editing something in import modal it gets change to: As you can see it removed the Naked text node i.e Insert your text. It should be noted that...

artf

You're mixing the old API with the new one for the custom component definition. With model: defaultModel.extend({ was required an inner static isComponent (you're using one outside, like in the new API) and without it, you're breaking the...

mustahsanmustafa

UPDATE: If i just extend my custom components from textnode instead of default, then the issue gets resolved somehow: but it will be better if the issue is resolved at default as well. cheers