GrapesJS Issues

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

829 issues found

๐Ÿ” question
#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.

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

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

#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?

#927March 5, 2018by JulyanoF2 answers
0 reactions

[QUESTION] How to disable image resize?

I was looking for it in wiki but I didn't found anything about it. I would like to disable resize for all current and future images for default. Is it possible?

artf

Extend the image Component and put as a model property resizable: false

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.

#926March 5, 2018by NealWalters3 answers
0 reactions

BUGS:Documentation/Clarity

If grapejs requires NodeJS, the doc/wiki should say that clearly upfront somewhere (i.e. list major dependencies and what type of server is needed to run it). You mention it runs in a CMS, but don't state that it will create a full page and can or cannot run outside of a CMS. Question: If it runs with NodeJS - will it...

artf

If grapejs requires NodeJS, the doc/wiki should say that clearly upfront somewhere Indeed it doesn't... you need nodejs just for the development purposeYou mention it runs in a CMS, but don't state that it will create a full page and can o...

NealWalters

Thanks Art. Okay - let's re-read this: "GrapesJS was designed to be used inside a CMS to speed up the creation of dynamic templates." That could mean I need a CMS then I paste GrapeJS into it; or it could mean it was meant for a person to...

artf

Yeah it's not only about CMS but a general purpose use. Inside grapes.min.js you will get everything you need, NodeJS is just for a correct development server (testing, merging dependencies, etc..)

#923March 3, 2018by sura2k3 answers
0 reactions

[Question]: Add a select-option to toolbar

I have read the code and only I could find out that there is only a list of ToolbarButton associated with the toolbar. I have a special trait that I would like to put it into the toolbar because it is very important to see the user which component has this trait and also to change it on the designer/canvas without hav...

sura2k

I was able to manage it by modifying ToolbarButton and its view. But later I decided to expose them by adding those to DomComponents via separate property rather than modifying ToolBar..., so I can extend them and since the changes are few...

vtsoft

Hi @sura2k, I also want to add a select option to toolbar. Can you please share your ideas/code/script on how did you implement it? Thanks in advance.

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.

#922March 2, 2018by mbleverage3 answers
0 reactions

QUESTION: Adding default styling to a component

I have been working on integrating grapesjs into a new development I'm working on. I have had much success with the documentation and wiki forum but am running into a few issues I'm hoping someone out there can help me with. I am working with a mobile view only, I have set the default device to mobile and hidden the o...

artf

Your change on the block doesn't work because you don't change the actual component (just the block's property) With cssComposer instead, by default, selectorManager accepts classes An easier way to add custom CSS might be this one But be...

mbleverage

Thank you! I was able to get that working with: protectedCss: 'img {max-width:100%;}', I have the same issue with videos and iframes (for youtube) being dropped onto the template larger than the screen size and the protectedCss solution di...

artf

protectedCss is loaded so the CSS is here, if it doesn't work probably your CSS technique is not correct