GrapesJS Issues

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

3464 issues found

#941March 9, 2018by josefph1 answer
0 reactions

[QUESTION] Link in gjs-basic-blocks not working when clicked?

Guys when I click the link it does nothing even when I supplied the href in component setting. PS: No idea if this is a bug or the problem is on my end. I downloaded the latest grapejs-dev and basic-blocks.

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.

#940March 9, 2018by phucphanJaneto3 answers
2 reactions

GrapeJS can't load javascript

Hi. I have some script tag in my html code (includes js file and internal javascript tag) But GrapeJS doesn't load any script and apply this. Can I have any way load javascript to grapejs and export html include javascript code?

vishal5033

Hi You can allow script when you init grapesJS instance. const editor = grapesjs.init({ ... allowScripts: 1, }); Hope that helps you.

phucphanJaneto

@vishal5033 : many thanks for your helps. it works for me. The script file and internal js will show when export html. But I see the error message: and can you help me?

josefph

@phucphanJaneto try to post your code? maybe something is missing or you got the wrong syntax.

#938March 8, 2018by andre23 answers
5 reactions

[Question] How to integrate handlebars with GrapesJS?

Hi, How i can integrate handlebars or other template engine with GrapeJS? I mean to create eg. dynamic component with product details: And show parsed data in GrapeJS editor eg. But on export user must get raw data, i mean code with handlebars content. Someone can help?

ondrejpolach

Hi andre2, do you complete this solution for handlebars integration? can you share some code please?

artf

You should create a custom Component which implements the template engine inside its view (eg. compile the template inside the render method)

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.

#937March 8, 2018by nojacko2 answers
0 reactions

[Question] Is it it possible to extend the select trait?

I'm looking to create a trait called colours. This trait has a dropdown of colours that can be selected. When a colour is selected, I'd like to modified the class of the element to include the selected colour and remove other colours. The modifying of the class should be simple enough but I'm looking to extend the def...

artf

Unfortunately, the current implementation of traits doesn't allow extending its types

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.

#936March 8, 2018by eliranbl2 answers
0 reactions

Duplicate image on upload

Hello When I upload images I see duplicates image on modal . Have any options to delete the asset?

artf

Follow the issue template please

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.

#935March 8, 2018by josefph3 answers
1 reactions

[QUESTION] In creating a custom block how do you create it's corresponding settings?

I want to make a link that will let the user enter the url for it or to let him choose a link to another page which he already created.

artf

Check Traits

josefph

@artf thanks! got it working! When I was looking at the wiki I totally missed the Traits section. sorry for that artf. but now I do have a problem. When I click my link it does not trigger. The html composition is correct. can you help me...

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.

#933March 8, 2018by TheMysticMan2 answers
0 reactions

Setting backgroud image results in duplicate style rules

Hi @artf, I have one strange little problem. I have a custom trait which has an implementation for setting images and background images. When I set the background image a second time by using the code below I'm getting duplicated styling rules on the element Id. I already played around a bit with the forceClass and av...

artf

Duplicate of #932

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.

#932March 8, 2018by TheMysticMan3 answers
3 reactions

Setting background image results in duplicate style rules

Hi @artf, I have one strange little problem. I have a custom trait which has an implementation for setting images and background images. When I set the background image a second time by using the code below I'm getting duplicated styling rules on the element Id. I already played around a bit with the forceClass and av...

samuelmattos

Hi, i have same problem. In preview https://jsfiddle.net/szLp8h4n/77/ When I change the background of the box in the preview it changes, but in the code it generates another id. If you save the template in this way and try to display it on...

artf

Thanks for the example @samuelmattos currently the only workaround I can give you is starting to use this option: Probably in some next release I'll set it to true by default. Unfortunately, this will not gonna fix the bug of duplicated ru...

artf

First of all, I suggest using self.target.addStyle({'background-image': 'url(...)'}) for your case which is less verbose.Maybe related to this problem: The element also has a class with a default background image. When I open the StyleMana...

#931March 7, 2018by altemberg2 answers
0 reactions

[Question] Problems saving to DB

Hi, I'm having some problems saving the template in the database and I'm not exactly sure why this is happening. I've read all the issues here and still can not save, there are always 3 things: Save it blank, save the array value or save a JSON with tens of bars between each value. My code looks like this: When it is...

artf

Seems like the image you posted is corrupted. BTW, just look what does it happen at the network level (via inspector) and I'm sure you will find the error One more thing, I know that you copied this from some other issue but here you're ad...

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.

#930March 7, 2018by alfaalex813 answers
1 reactions

[Question] Update resizer after asset changed

Hi! I trying to change default assets manager with ours custom manager. On double click the selected image is replaced with a new one with different size. It works, but the resizers element not updating their position. It is possibile to re-initialize it? Thanks!

alfaalex81

I have an image on canvas, for example 300x200, double click on it and I select a new image from asset manager, now is 600x400. When i launch your suggested code the new image is not ready. I solved with a preloader, In Italy we say: "I am...

artf

Try to reselect the component

alfaalex81

Thanks for your reply, I tried your suggestion, but the image is not ready yet when I launch selection update. There are a callback or a listener on loaded image?