GrapesJS Issues

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

3464 issues found

#3589July 3, 2021by lbmir2 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...

#3588July 3, 2021by ap0l01 answer
0 reactions

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

#3587July 2, 2021by milan-holes1 answer
0 reactions

QUESTION: 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

#3586July 2, 2021by jcsofts3 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.

#3579June 30, 2021by mcottret3 answers
2 reactions

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

#3578June 30, 2021by jcsofts1 answer
0 reactions

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

#3577June 29, 2021by alimajed932 answers
0 reactions

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

#3575June 28, 2021by jcsofts2 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

#3574June 28, 2021by alpha2k-io2 answers
0 reactions

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

#3573June 27, 2021by jasminder1 answer
0 reactions

BUG: 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 },