GrapesJS Issues

3,464 parsed GitHub issues โ€” 370 solved ยท 90 open. Search, filter and explore battle-tested answers.

569 issues found

๐Ÿ” canvas
#1366August 15, 2018by blairpanek3 answers
0 reactions

[BUG] Duplicating CSS

On newest version of Grapesjs. I can replicate bug on both. Linux Ubuntoo, Moxilla. I expect that the css only shows up once, otherwise it'll be to much in the window for use when exporting it. Css gets duplicated. Duplication happens with @keyframes styles. So clear canvas drag tabs block onto canvas export import an...

artf

@blairpanek I don't understand how to reproduce the issue, provide a live demo 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...

yomeshgupta

@artf Great work on the project! However, I noticed that CSS inside media queries are repeating itself. Any idea why? Facing the same issue on my local machine too. Happening on the demo page too : https://grapesjs.com/demo.html

#1356August 11, 2018by kickbk3 answers
0 reactions

Add "Insert" button to assets manager

How would you go about adding a "Insert image" button to the assets manager modal? At the moment the "Add Image" may be confusing to some who would thing that button would actually insert the image onto the canvas and keep clicking it till their mouse would drop dead :)

artf

Are you just asking to rename the Add image with Insert image?

kickbk

@art here's a mockup to get the idea across. Not I am using BS to style the buttons. So you click on an image to highlight and Import to close. Currently when you click it already replaces the image but the modal does not close. It is hard...

kickbk

Sorry... did not mean to close the issue.

#1355August 10, 2018by david-polak2 answers
0 reactions

[QUESTION] Component resize event

I have a canvas component and I need to be able to register resize events for it. After diving trough the code and looking for relevant model events all I could come up with, that would actually trigger on the resize is this: Which works, but is kinda hacky. Is there a better suited event?

artf

Hi David, I think currently is the best you can do, but I'm open for suggestions to make it less hacky

lock[bot]

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

#1349August 7, 2018by Sheetalordant2 answers
1 reactions

Update style manager properties depends on components

Hi @artf Thank you for great library. I want to update style manager properties on the basis of components type. For example, If there is text components on canvas then there should be only text related properties like font, font-family and no width and height. Is that possible?

artf

Yes, please check #1131

lock[bot]

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

#1345August 6, 2018by alibouaziz3 answers
3 reactions

html2canvas give blank

i want to export the disposition to an image, but give me blank image. var div = document.querySelector('#wrapper'); html2canvas(div, { onrendered: function (canvas) { var screanshot = canvas.toDataURL("image/png"); } }); thanks.

HakuTheWolfSpirit

I advise you to ask the question under the html2canvas tag on StackOverflow. This is not really an issue with grapesjs. Also check wether your document.querySelector returns null. I think you are not using the iframe document.

artf

@alibouaziz the #wrapper is inside the GrapesJS's iframe, so querySelector returns nothing. You can access the content of the iframe via Canvas module, so to get the body you would do editor.Canvas.getBody()

lock[bot]

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

#1333August 1, 2018by kripper3 answers
0 reactions

Bug in WebPage Demo

To reproduce: 1) Open https://grapesjs.com/demo.html in incognito mode. 2) Import this code: 3) Clear Canvas 4) Press Import. Result: The code is not cleared. There is thrash from the previous imported code. Expected Result: Code should be clean.

artf

Only class-based selectors are tracked and therefore could be removed, others are left.

kripper

What about id-based selectors? grapesJS is adding them all the time. The problem can also be reproduced with just this code:

lock[bot]

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

#1328August 1, 2018by jorgecgll2 answers
0 reactions

[Question/bug] Reordering components in the canvas

I've noticed some inconsistencies when moving DOM components around in the canvas. Description in the gif below using the Webpage Demo: In my case, I do see the DOM component "moves" being reflected when I output editor.DomComponents.getComponents(). They actually get reordered, but the Canvas does not reflect those m...

artf

Never had time to debug it but I think it caused somehow by components with float: right style applied

jmrgz

Yes, it is related to the float right property. Actually, that is the real behavior of the float right property (the last html element appears the first) so I do not see an easy solution.

#1321July 26, 2018by maryia-kabash2 answers
1 reactions

[Bug]: Image component is not deleted

The bug is reproducible on GrapesJs demo page. Steps to reproduce:Drag&Drop or select an Image component.Click delete icon from the toolbar. Result: nothing happens, as ed.Canvas.hasFocus() (file commands/view/ComponentDelete.js) returns false.Select any other componentSelect image again and try to delete it. Result:...

artf

Thanks Maryia, it should be actually fixed with the latest version https://github.com/artf/grapesjs/releases/tag/v0.14.25 (same as #1298)

lock[bot]

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

#1311July 24, 2018by inventorbit2 answers
0 reactions

[Question]: Initializing Canvas Scripts and Styles dynamically

Hello Grapejs team, Thanks for this wonderful project saved my time and so far I had great experience with integration and your community support. I want to load Canvas Styles and Scripts after the page is loaded from DB (Rest API) canvas: { styles: ['https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.mi...

artf

Hi @inventorbit for such a case you should manipulate directly the canvas document

lock[bot]

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

#1306July 23, 2018by jvillena3 answers
1 reactions

Inserting text in an canvas element is not updated on the HTML content after saving it.

H @artf, I have a pitfalls in the middle of saving the HTML content. Right now we have a popup modal dialog where I can select some special text and inject on the canvas in the selected element. The issue is when saving the HTML content the changes are not reflected on it. It likes I have to refresh or update the mode...

BlazedCode

Hi @jvillena. Would you mind sharing some of your code please? I'm attempting to do the same thing but I just can't figure it out. I keep adding <span> tags as "placeholders" to insert the variable values, but they are always added to the...

jvillena

I've just solved. I had to render the DomComponents after applying the changes. The solution was:

artf

No, with this editorRTE.DomComponents.render() you're triggering the render of all component, please read carefully about Components, by looking at stuff like this editorRTE.getSelected().view.$el[0].innerHTML = value I think you just didn...