GrapesJS Issues

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

644 issues found

๐Ÿ” components
#2624March 5, 2020by kierenayima1 answer
1 reactions

[BUG] Generated styles do not escape colons in classnames

Currently using GrapeJS for a project that I am working on locally and integrated it with some tailwind UI components. It mostly works great, but I have noticed that making changes on some elements does not work (for example, changing text color or formatting). Looking at it further I can see that this is because the...

artf

Thanks for the report @kierenayima Selectors will be escaped in the CSS in the next release

#2619March 3, 2020by mcottret2 answers
1 reactions

[Bug]: Default image placeholder's src attribute generated / exported as <svg> element

Hi, and thanks for the great library ! We might have found the following bug when playing around with it: When adding a new default "Image Block" without further configuration (leaving the default image placeholder), the exported / generated HTML code embeds the default svg element as the image's src attribute value (...

mcottret

Thanks ! #2620 opened.

artf

Thanks for the report Mathieugrapesjs/src/dom_components/model/ComponentImage.js's getAttrToHTML function should call this.getSrcResult (not sure whether or not to use the fallback option) rather than this.get('src') to retrieve the base64...

#2617March 3, 2020by rufusnguyen1 answer
0 reactions

Enable Drag Mode to inner of a single component instead of editor

Hi @artf , I set dragMode of my Grapesjs builder to "absolute" and then build a section component to ensure that all other components must be placed in section component. However, section component should be ignore of being "absolute", it should be static. I had tried: Remove dragMode: absolute for builderAdd dmode: '...

artf

Well if you declare dragMode in the init config, that will be the default for ALL the components, then, if you want, you can change the dragMode per component https://github.com/artf/grapesjs/issues/1936#issuecomment-521269499

#2614March 2, 2020by makbari3 answers
1 reactions

[QUESTION] Recursive view update of custom component

Hi, I have defined a custom type like: I want to keep the customTag in my model and show the content (HTML) in the view. However, in the content, it is possible to have same customTag inside with different href and content. On view render, Grapesjs does not get trigger this type for the nested customTag (which I under...

makbari

OK. I found a work around. and since this question is too specific I close the issue. Thanks for the support.

artf

If you're doing this element.innerHTML = res.result; you just place the content as a static one, the editor doesn't parse it to components, what you're probably looking for is updating the model model.components(res.result) I'd recommend r...

makbari

Thanks for the reply. The goal is to keep the model as <customTag></customTag> and just render the content as static. However, I did not find the way to react to the static contents upon render. That's the reason I want to keep model and v...

#2611February 29, 2020by orionseye2 answers
0 reactions

[HELP] Dragging external content to Canvas

I am trying to add d&d functionality from a modal which lists a bunch of html files (html snippets) .. into the editor canvas. Each of them enclose the content with a <section> I tried to use 'canvas:dragdata' to allow dropping into canvas As i understood, this is to extend the file types can be dropped, GrapesJS supp...

orionseye

I am clarifying what i want to achieve: I have some 100+ html snippets which i use on current 'handcrafted' builder and need to migrate them to GrapesJS. To my surprise,, this doesn't seem to be a straight forward job. Currently, with 2 Aj...

artf

Here you can find how to do that https://github.com/artf/grapesjs/issues/2595

#2598February 24, 2020by olgertpysqyli1 answer
0 reactions

Video component error

I have a problem with video component. I select provider and add the source of the video and then save the html, but when i load the html again to the editor video component source gets replaced with < svg xmlns="http://www.w3.org/2000/svg" width="100" viewBox="0 0 24 24" style="fill: rgba(0,0,0,0.15); transform: scal...

artf

Hi @olgertpysqyli you should follow this and rely on JSON data for editing https://grapesjs.com/docs/modules/Storage.html#store-and-load-templates

#2597February 24, 2020by ikenderham1 answer
0 reactions

How to add custom name to allready inserted components?

Hello.. I need to put af custom name on my components. I can do that by adding data-gjs-custom-name="myname" but how do i do that on allready inserted elements? I tried to editor.SelectorManager.getAll().each(selector => $('h1').attr("data-gjs-custom-name","h1")); but its not working. How is it possible to put a name...

artf

I can do that by adding data-gjs-custom-name="myname" Use name instead of custom-name (this one is used for Layers when you edit them), so data-gjs-name="myname"How is it possible to put a name on all h1, for example? You can create a cust...

#2581February 18, 2020by Jogai3 answers
0 reactions

[Bug]: How to use components

Using GrapesJS 0.15.10 I cant get the components to work the way I intent. Its probable me, so if its a question, feel free to adjust the title of the issue. (its a follow up of https://github.com/artf/grapesjs/issues/2195) I've made a pen (hope thats ok, didnt see the fiddle templates) for my example: https://codepen...

pouyamiralayi

Hi @Jogai you must also specify the `data-gjs-draggable on the <td>`: Cheers!

Jogai

Thanks. At least thats an improvement, but still the other properties are not taken into account, and if you try tro drag it (since the drag arrows still show up) it throws an error and then the whole editor is in a broken state. I updated...

Jogai

Updated the example. Its sort of a followup on https://github.com/artf/grapesjs/issues/2195 My assumption is wrong that draggable needs data-gjs- prefix, because the html part without using component doesnt have that either. Still the chil...

#2576February 17, 2020by ajaykr0891 answer
0 reactions

Uncaught DOMException: Failed to execute 'matches' on 'Element': The provided selector is empty.

Hi there, I m getting below error while dropping components on the canvas. This only occurs if i have already some disabled components on the canvas. Uncaught DOMException: Failed to execute 'matches' on 'Element': The provided selector is empty. at r.matches (webpack-internal:///./nodemodules/grapesjs/dist/grapes.min...

artf

Follow the issue template if you're submitting a BUG

#2573February 17, 2020by rastaprime202 answers
0 reactions

[QUESTION] Get all related CSS Rules from mulit-level CSS Selectors

Hi @artf Hope you are doing well. I've been cracking on this matter for the past few days now, I've been searching whether I got the same scenario with the others, but unfortunately, I can't find any solutions that can solve my problem, so I decided to raise an issue ticket. I hope I will make sense. So I have a 'Save...

artf

This is the command I use in Grapedrop to get all the CSS from a component

rastaprime20

Hi @artf Thank you so much for your response! I will try this out, and let you know if I run into any problems. I really appreciate this.