GrapesJS Issues

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

3464 issues found

#1849March 3, 2019by minuwan1 answer
0 reactions

What am I missing ?

What am I missing to make the tag "div" named as "Div" by default ? (Override the default)

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.

#1848March 3, 2019by sanjib003 answers
0 reactions

[Question] After page reload plus ("+") button not showing.

Hi @artf , When I drag the section block, a plus button is displaying. After save and reloading the page, "+" button not showing. I need to show the button after page reload also. Please suggest me, how can I solve this problem? Please check the jsfiddle, similar scenario created.

noogen

@sanjib00 when you render fromElement, it's a content, not component. e.g. "\<section\>" html tag would not automatically get recognize as component because you don't have any code to recognize it as so. (hint: isComponent function or data...

artf

@sanjib00 probably you're loading incorrectly your template data https://grapesjs.com/docs/modules/Storage.html#store-and-load-templates

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.

#1847March 3, 2019by minuwan3 answers
1 reactions

Customize the navigator

Is there any way to customize the view of the navigator/layers panel? I need to display an icon in front of each item in the navigator.

artf

@minuwan well actually the view already renders the icon https://github.com/artf/grapesjs/blob/94e295ef919dceaade90a3aa36355f2e23935657/src/navigator/view/ItemView.js#L47 but the idea of customizing the render of layers it's not bad.

NicoEngler

I am not sure what "the navigator" is but since you can create your own panels and whatever, you can customize every bit of the visuals. Can you be more precise on where you try to add your icons?

minuwan

@NicoEngler Navigator is the layers panel, GrapesJS called it "The Navigator". Currently, it only contains few configs, but the render it in a different layout or add an icon to a layer item is not possible it seems.

#1846March 2, 2019by sushiljic2 answers
0 reactions

[Question]: Using ngModel on component that contains groups of tagName

I have tried this solution https://github.com/artf/grapesjs/issues/1819#event-2158016066 But on custom components Let's say, i have a mixture to two text input and a button, How do it specify attributes ngModel to both two text input?

artf

Create a custom abstract component with ngModel and then just use it when you need it

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.

#1845March 1, 2019by kickbk2 answers
0 reactions

Deleting a form input

I think there are some bugs with the form inputs It is not possible to delete a form input. When you turn off "Show borders", you can then select the input and delete, but trying that again right after, again doesn't let you delete. It also makes the inputs un-selectable. See below:

artf

Thanks for the report @kickbk this is already fixed by https://github.com/artf/grapesjs/pull/1800 and will be available in the next release

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.

#1844March 1, 2019by sakshigarg93 answers
0 reactions

Remove upload image option and disable (x) icon for default images

I want to remove the "Drop files here or click to upload" section and also disable the (x) cross icon next tothe default images, not allowing the user to delete default images. @artf where do i change the css? I'm using the grapesjs-preset-webpage Originally posted by @sakshigarg9 in https://github.com/artf/grapesjs/i...

NicoEngler

One easy way to achieve this would be adding some CSS rules: .gjs-am-file-uploader { display: none; } .gjs-am-assets-cont { width: 100%; } And so on ... :)

sakshigarg9

Thanks worked! But I'm unable to remove the (x) icon next to the default images despite using .gjs-am-close{ display: none; }

NicoEngler

Great, just use that css rule to hide it.. :)

#1843February 28, 2019by coder-strange3 answers
3 reactions

Class on different states are not being applied to those states.

I'm trying to apply a class on hover of a component and the class is being applied but not on hover, it applies with normal state. Please let me know if I'm looking into right feature or I misunderstood the feature. PLNKR : https://plnkr.co/edit/Est6AnnGInBa3yvhzCvm?p=preview I don't see anything in CSS or HTML itself...

NicoEngler

I have just checked and can confirm that it also works in your example. First add a class to your component, e.g. .text-blue-on-hoverNext, select the state you want to modify, e.g. hoverNow for instance change the color of the text to blue...

coder-strange

Now I get that, it works perfectly fine, I just didn't know that how it works. Thanks @NicoEngler for you this fast reply and clearing me out :)

NicoEngler

The class is applied regardless of the components state. Based on that, you can select a state, e.g. hover and style your class in that particular state. Effectively the following css will be created if you select the state hover and color...

#1842February 28, 2019by AkibDeraiya1233 answers
2 reactions

Showing two times some properties and not showing some options too.

Hello, @artf @NicoEngler, I have one strange issues. I am using grapes.js and grapes.min.css with version of 0.14.50. While i am selecting any component then i can change it's css properties through editor side pane. But i can see two times dropdown Typography and Decorations. I see into demo of the grapes.js it shows...

NicoEngler

Please show how you initialize grapesjs. Chances are the problem can be found there.

scottreag

Facing the same issue too. It's been two years, has anyone found a solution?

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

#1841February 28, 2019by minuwan3 answers
3 reactions

Components name

I have two questions.Is there any way to change the built-in components name? I wanted to change the name "Box" to "Div". so the same name appears on select and on the layers/navigator panel. In simple term, if I drag and dropped a div, I need it to be named Div.Any way to add an icon in front of the text of each item...

NicoEngler

You can use data-gjs-custom-name on your components html. <h1 data-gjs-custom-name="Your Name" ...>You can use data-gjs-icon on your components html. <h1 data-gjs-icon='<i class="fa fa-arrows"></i>' ...> Please change your title to somethi...

artf

I'd add that if you rely on HTML5 drag & drop, you can use canvas:dragdata event https://grapesjs.com/docs/api/editor.html#available-events This allows you to make the editor understand "external drops", eg. by default GrapesJS can recogni...

minuwan

@NicoEngler Any other way to set default custom names for each type? If someone drag and drop content from outside, I want to display those div's names as "Divs" as well. :)

#1839February 27, 2019by sakshigarg93 answers
5 reactions

Unable to remove trash icon from Panel

This is my code in index.html. I'm using the grapesjs-preset-webpage

hpruvot

@sakshigarg9 I think I found what you wanted I had the same problem... Some buttons IDs are stored in a constant file : So when you look into this file, you'll be able to find the right IDs : And so to get the trash button : editor.Panels....

NicoEngler

Of course that worked but you should not do it that way. You are losing maintainability.

NicoEngler

Either your panel does not have the id options or your button not the id cmdImport. Btw, the trash icon does not really sound like "importing". Maybe you have mixed that up. Other than that, please provide more code.