GrapesJS Issues

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

3464 issues found

#3149November 21, 2020by MarksEliel1 answer
0 reactions

BUG: Background layers empty in reload editor

Version: Last In the demo the bug does not appear, I believe that for using localstorage for storage. Grapesjs works normally, with background, but when I insert the background layers, except, everything is displayed correctly. The problem is that when I reload the editor, it does not show the layers that were created...

artf

In the demo the bug does not appear, I believe that for using localstorage for storage. No, using local storage or remote one has no difference as the JSON structure to use is the same. Indeed, I guess you're loading back the HTML instead...

#3146November 19, 2020by fahadali13 answers
2 reactions

There are so many clicks required to enable RTE can i edit text with just single click

There are so many clicks required to enable RTE can i edit text with just single click i tried by adding attribute contenteditable but storage manager not recognize text changes that way plz hlep

artf

You can extend the Text Component View and trigger onActive with a click instead of dblclick https://github.com/artf/grapesjs/blob/d3256e621bb43a537213ffcd86b10dc0bd070c0b/src/dom_components/view/ComponentTextView.js#L7-L10

antoineando-zenchef

@vidhii16 @fahad157 I was able to get it to work using this code: <img width="758" alt="image" src="https://github.com/user-attachments/assets/2f9418e8-66f4-43ef-a5ac-428ede52e8a9" />

fahad157

@artf I tried by changing it to click but it not working for me please help

#3145November 17, 2020by sashapawlow7261 answer
0 reactions

FEAT: how to edit a button if the button has an action (opening a modal window)?

I have a html template. the html template has a button. when you click on the button, an event occurs (opening a modal window). Is it possible to visually change the appearance of a button without firing an event? With allowScript: 0, I can edit the appearance of the button, but in this case, the event does not fire (...

artf

You have to create a custom component for that button if it requires custom logic/behavior from what the original HTML does

#3144November 17, 2020by antman33511 answer
0 reactions

[Question] Swap default factories

Hello, I'm using GrapesJs to template HTML for printing so I need the measurements in mm. Is there a way to swap the default factory in the StyleManager? maybe pass it in the options? Thanks, Antonio

artf

No, you can't, you just need to configure your properties in the StyleManager configuration (example configuration can be found here)

#3143November 15, 2020by sprklinginfo1 answer
0 reactions

Hide toolbar for inner components

By default, when a component is selected, the toolbar is displayed with 'move, copy, delete' etc actions, it is set with ' showToolbar: 1' option. When I define a custom component which may have several inner components, I want to hide the toolbar for those inner components. I don't want to hide it globally in grapesj...

artf

When you define the component, you can customize the toolbar array

#3142November 14, 2020by mohd74692 answers
0 reactions

AssetManager rendering issue

@artf this is the same issue #2760 that has already been addressed before, is this wrong or am i doing? i expected assets not to be shown but they are all visible this is my code and I am using version of "grapesjs": "^0.16.27",

artf

@awais786327 provide a live demo of the issue, please

no-response[bot]

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take ac...

#3141November 14, 2020by webdevhayes2 answers
0 reactions

Loading dynamic content

I really apologise if this has been covered previously. I have searched the issues and also read the documentation quite extensively and maybe I am not just understanding it correctly. I understand you can do run a script in the page builder to load the content however that content/html will be saved once I click save...

artf

I think you have to read this guide

anuragk15

Did you find the solution? I have a similar issue. For example, when I write blog and store them in my database. Now whenever someone visits my landing page(made with Grapesjs) I want them to see my latest blog there. Also, if some end-use...

#3140November 13, 2020by ZeroCoolHacker1 answer
0 reactions

Interactive component in canvas

I am building a quiz builder plugin using grapesjs. I was wondering if we can add a component which is interactive and adds new components when clicked. For example Something like this. When dropped, there are no inputs but when clicked add new field, the input appears. Is it possible? how?

artf

You have to extend the View of your custom component

#3139November 13, 2020by adamwpe2 answers
0 reactions

FEAT: Disable <table> being auto amended during save

I'm getting an issue, when saving a custom HTML component (just a table), grapes JS will modify it. before save after save. So I want to be able to insert a table like because I would like to intergate it with twig (a templating language) : I believe it is linked to #606, but I can't see if that helps this problem I'm...

adamwpe

Ah, If I use this https://github.com/artf/grapesjs-custom-code, it does not amend the html during saving. This will not work when using 'gjs-preset-newsletter'. Since if you run command 'gjs-get-inlined-html' then it amends the code. E.g....

artf

You can't insert invalid HTML. If you need to handle stuff like that, you have to create a custom component which then will output the custom code.

#3138November 13, 2020by adamwpe1 answer
0 reactions

QUESTION: Prevent <TABLE>from being modified during saving.

Hi All, I'm getting an issue, when saving a custom HTML component (just a table), grapes JS will modify it. before save after save. Is it possible to wrap something around it so it does not get modified? The reason for the problem is that I'm using twig (a templating language) to dynamically create the table, and afte...

adamwpe

Replace with #3139