GrapesJS Issues

3,464 parsed GitHub issues β€” 370 solved Β· 90 open. Search, filter and explore battle-tested answers.

1,399 issues found

πŸ” outdated
#933Mar 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.

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

#931Mar 7, 2018by altemberg2 answers
0 reactions

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.

#930Mar 7, 2018by alfaalex813 answers
1 reactions

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?

#927Mar 5, 2018by JulyanoF2 answers
0 reactions

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.

#926Mar 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..)

#925Mar 4, 2018by hadifarnoud2 answers
1 reactions

How to add H1 tag?

I could not figure out how can one add H1 or any other header text tag. this is important because of SEO

artf

Probably you should read more about Blocks Seems like someone has made a plugin for headings :) https://github.com/olivmonnier/grapesjs-plugin-header

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.

#924Mar 4, 2018by jadebayo2 answers
0 reactions

Calling 'preview' command not working correctly

This is a piece of code that i am an using: this.editor = grapesjs.init(this.config) const commandManager = this.editor.Commands commandManager.get('preview').run(this.editor) I want the editor to go into preview mode immediately upon loading. It does go into preview mode but the offsets are still displaying. Hovering...

artf

Yeah, you should make use of this

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.

#923Mar 3, 2018by sura2k3 answers
0 reactions

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.

#922Mar 2, 2018by mbleverage3 answers
0 reactions

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

Browse all topics