GrapesJS Issues

3,464 parsed GitHub issues β€” 370 solved Β· 90 open. Search, filter and explore battle-tested answers.

3,464 issues found

#3589Jul 3, 2021by lbmir3 answers
0 reactions

Autoload storage is not working on page refresh

Hi, firstly I want to say that this project is awesome, thank you! I used code from GrapeJS Demo example, and added there save and load data from remote files, this is my storageManager code: savenow.php file code: loadnow.php file code: When I am saving my changes it is working fine, but after that if I am press to R...

lbmir

Same issue like on https://github.com/artf/grapesjs/issues/2963. But in my case it is loading content only after Hard Refresh

artf

Sounds more like an issue from your side, web applications do not distinguish Refresh from Hard Refresh, indeed the Hard Refresh is more like a refresh without the browser local cache. Try to check, from the inspector, if your load call is...

GJSBlock

Thanks for reporting this, @lbmir. Great question about Autoload storage is not working on page refresh. The recommended approach with GrapesJS is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific...

#3588Jul 3, 2021by ap0l02 answers
0 reactions

Any way to make GrapeJS Mobile Editor usable?

Hello, Amazing project! however, after checking the plugin for grapejs touch is still very hard to use the editor from a Mobile Device. is there a way to simplify the UI to make it easier to customize from a mobile device? This mainly for the "newsletter" option. Thanks a lot! hope I didn't break any rules

artf

Unfortunately, the current UI is what it is, the alternative is to build your own UI more mobile-friendly.

GJSBlock

Thanks for reporting this, @ap0l0. Great question about Question: any way to make GrapeJS Mobile Editor usable?. The recommended approach with GrapesJS is to use the event-driven API. Start here: Check the GrapesJS documentation for your s...

#3587Jul 2, 2021by milan-holes2 answers
0 reactions

How can I create grapesjs service for generating HTML from stored components?

Hello. Is there possibility to create grapesjs instance, without generating whole editor? I had created custom components with async data and I need to create backend service in Node, which generates HTML output from stored components, populated with data from APIs. Now I am getting error:ReferenceError: window is not...

artf

I close it as a duplicate of https://github.com/artf/grapesjs/issues/3399

GJSBlock

Thanks for reporting this, @milan-holes. The error error:ReferenceError: window is not defined occurs when Components attempts to access properties before the component lifecycle is fully initialized. This is a common race condition in Gra...

#3586Jul 2, 2021by jcsofts4 answers
3 reactions

How to listen the components change in a component.

init() { this.listenTo(this.model,'change:components', this.handleComponentsChange); }, I develop a component, I try to listen the child components change, then I add above code to view init, but the function doesn't fired when add/remove component. how I can listen the components change in a component view? thanks

dm-siegel

I couldn't get this to work either. Error reading components() when setting the listenTo. The tag is empty (no contents inside) on init, so this makes sense. never mind... i was doing this in the init of the model instead of the view. this...

anlumo

The components collection doesn't change, that's why there's no event triggered. The storage backend is a Backbone collection, see here. You have to listen to its events, specifically add and remove.

artf

As already mentioned by Andreas, you have to add a listener to the collection.

#3579Jun 30, 2021by mcottret4 answers
2 reactions

RTE misplaced when opened right after dropping `activeOnRender` component

Version: 0.17.4 Are you able to reproduce the bug from the demo?[x] Yes[ ] No Steps to reproduce:Go to the demoDrop a "Text" block inside the canvasClick on the "Text" component that was just droppedThe opened RTE is misplaced (cf attached screenshot) What is the expected behavior? The opened RTE should be positioned...

artf

Yes, I guess you're right. It doesn't actually make sense activating RTE without selecting the component (it probably makes sense with all other "activatable" blocks).

gustavohleal

Hi. Me and @ronaldohoch have found a workaround for this problem. We trigger the scroll event when the RTE is enabled. Here's the code:

ronaldohoch

Hello, just updated the file from commit bb4a661, and i think it's so close, i'm using the grapesjs-ckeditor code and the first open of RTE, i'ts placed right: But at the second time the rte is open, it's misplaced again... :/ I'll keep ch...

#3578Jun 30, 2021by jcsofts2 answers
0 reactions

Version 0.17.4 the components missing when try to add background image to body

I add domComponents: { storeWrapper: 1 }, when initialize the webeditor, to enable add background image to body. it works fine when use the local storageManager , but all the components lost when use the remote storageManager below is the data {"type":"wrapper","droppable":".container","attributes":{"id":"izmf"},"comp...

artf

Hi @jcsofts if the local storage works fine and your remote does not, that means you're probably doing something wrong on your endpoint side. I can't help you here without a reproducible example so I can only suggest following properly thi...

GJSBlock

Thanks for reporting this, @jcsofts. Thanks for sharing your report about version 0.17.4 the components missing when try to add background image to body. To help the team investigate and prioritize this: Please provide: A minimal reproduci...

#3577Jun 29, 2021by alimajed933 answers
0 reactions

The UndoManager hasUndo() method returns true when it shouldnt

I am trying to disable the undo button when there are no undo actions to do. To do so, I am listening to 'change:changesCount' event, and using editor?.attributes?.UndoManager?.hasUndo() to set the undo button disabled state. editor.on('change:changesCount', editor => setHasUndo(editor?.attributes?.UndoManager?.hasUnd...

artf

So there is an extra action added to the queue while it shouldn't, which is when I am dragging a block over the canvas. Not really, are you able to create a reproducible demo, as I'm not able to reproduce it?

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...

GJSBlock

Thanks for reporting this, @alimajed93. Great question about The UndoManager hasUndo() method returns true when it shouldnt. The recommended approach with Canvas is to use the event-driven API. Start here: Check the GrapesJS documentation...

#3575Jun 28, 2021by jcsofts3 answers
0 reactions

Grapes.min.js:2 Uncaught TypeError: Cannot read property 'length' of undefined

I got this error when add the <iframe src="https://app.conversiobot.com/boot/fvMEvO" width="100%" height="500" frameBorder="0" allow="geolocation"></iframe> used the custom code component. my code works fine with 0.17.4, but got below error with 0.17.19 grapes.min.js:2 Uncaught TypeError: Cannot read property 'length'...

artf

Thanks for the report, the fix is ready for the next release.

rahul-singh-bv

I am encountering a similar issue with v0.19.5 when I try to add an iframe inside of a custom code block

GJSBlock

Thanks for reporting this, @jcsofts. The error TypeError: Cannot read property 'length' of undefined occurs when Canvas attempts to access properties before the component lifecycle is fully initialized. This is a common race condition in G...

#3574Jun 28, 2021by alpha2k-io3 answers
0 reactions

Adding traits are not picked up by trait manager.

Following example from docs . Is there further configurtion to make new traitsa show for elements? The example using the input does not run, My id's are being picked up but not the additional attributes.

artf

I'm able to see your example properly and all the traits are working correctly. Are you able to create a reproducible demo?

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...

GJSBlock

Thanks for reporting this, @alpha2k-io. Great question about adding traits are not picked up by trait manager.. The recommended approach with Components is to use the event-driven API. Start here: Check the GrapesJS documentation for your...

#3573Jun 27, 2021by jasminder2 answers
0 reactions

Duplicate controls for every component

Version: 0.17.17 Are you able to reproduce the bug from the demo?[ ] Yes[x] No What is the expected behavior? It shouldn't show duplicate controls. What is the current behavior? Describe the bug detailed For some reasons, i am getting duplicate controls with vanila setup of gjs. Are you able to attach screenshots, scr...

artf

Add this to your init config in order to remove the default properties styleManager: { clearProperties: 1 },

GJSBlock

Thanks for reporting this, @jasminder. The issue with Duplicate controls for every component appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modifications ov...

Browse all topics