GrapesJS Issues

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

1,399 issues found

πŸ” outdated
#1994May 1, 2019by webdeveloper04293 answers
0 reactions

Is it possible to add StyleManager property for only class name

Thank for this awesome library. I am gonna to add style controller to sector. This style will be for only one class name and won't set target. For example ".xxx-wrapper div.active button:before" (xxx will be identifier of component so that inside buttons will be controlled by this sector) I tried to find in document b...

artf

No style manager can only change style properties (CSS) for any other thing you have to use Traits

webdeveloper0429

Thank you artf. so we can't use nested css selector (".xxx-wrapper div.active button:before") in cssCompose?

artf

You can create any CSS Rule by using setRule method but only class-based are visible in Style Manager

#1992May 1, 2019by benvmatheson3 answers
0 reactions

Is it possible to remove all CSS, instead of resetting to default?

On saving I export my CSS, then import it the next time I load. When doing so, it appends my CSS to the existing default CSS. editor.CssComposer.clear() appears to reset to default CSS, rather than clear all CSS. https://jsfiddle.net/benvmatheson/movxw7p1/3/ Is it possible to clear all CSS, or just have imported CSS r...

artf

On saving I export my CSS, then import it the next time I load Read this please https://grapesjs.com/docs/modules/Storage.html

benvmatheson

One example on those docs suggested just using the style attribute: However, other style was still prepended. Should it be assumed that when importing style, it will always be prepended with the following?

artf

This is the default CSS that you can change via protectedCss option, but again, if your purpose is to edit a previously created template, importing exported CSS is WRONG You might need to import HTML/CSS only on the creation of the templat...

#1991Apr 29, 2019by afdallah3 answers
2 reactions

Resizable, using unitWidth in px output into percent.

Hi @artf, Thanks for making this amazing framework. Recently I made a custom component based on your flexbox plugin. The red arrow is the actual value of the model. The green arrow is what I expected to be. Is that possible to set unitWidth as px but the output to be percent? Here is what I've triedI separated them as...

artf

Ah wait, my fault, opts is the 3rd one updateWidth(model, value, opts = {}) { btw the second argument in setStyle are options (eg, { silent: true } to avoid triggering change listeners) and you get those options also in the callback of you...

afdallah

You are the man!!! πŸ‘ πŸ‘ Thank you so much @artf.

artf

Hi @afdallah, from the resizer point of view you'd need to use updateTarget option to customize the target but unfortunately, you can't as it already heavily used by the SelectCommand So I'd ask you to try to use this in your updateWidth f...

#1990Apr 29, 2019by Ramkumar-Murugesan2 answers
0 reactions

Need to call method before remove the html component

Hi, I need to call the method before remove the HTML component. how can I do that calling method like editor.on('block:drag:stop', function (model) {})

artf

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.

#1989Apr 29, 2019by edward18932 answers
0 reactions

Canvas in Modal

is it possible to make modal that can be a canvas? I want to make a button that displays modal, then I can add the modal component from the block manager, Thank's

artf

Probably you're looking for components with js

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.

#1988Apr 29, 2019by MisterFK3 answers
1 reactions

Bug on resize image

Hi ! I have some issues when i want resize an image. When i put an image and when i click one resizer handler, the image don't keep his height but expand it to 100% of parent container... I didn't found an option into the "resizable" option to disable that : editor.DomComponents.addType('image', { model: { defaults: {...

afdallah

It would be easier for everybody here to help you if you can provide a live demo. I experienced the same issue, but in my case, it was because I set the image height to auto. Here is the example of my old issue:

MisterFK

Thanks but it's not the same issue. I take a video to show the problem :

artf

Thanks for the report @MisterFK can you provide a live demo of the issue, please?

#1987Apr 27, 2019by fmr4113 answers
1 reactions

Create toolbar in bottom

can I make a new toolbar that is located at the bottom (as shown by the cursor) when selected component? Thank's

afdallah

If you make that cell as a custom component, you can manipulate its View PS: this new syntax requires version 0.14.50+

fmr411

not only in the cell, but for all components

afdallah

Of course, you can apply the same technique to any component.

#1986Apr 27, 2019by benvmatheson2 answers
0 reactions

Where is configuration stored locally?

When I reload the badge builder, the previous layout I was working on loads. This still happens when clearing cache/cookies or opening in incognito mode. How is this being stored?

benvmatheson

It appears this is stored in localStorage. What was the intent behind this? Is it advised to just clear localStorage to reset data, or is there a grapes specific method you would recommend?

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.

#1985Apr 26, 2019by DylanSp3 answers
1 reactions

Autosave with remote storage doesn't send network requests

OS: Windows 10 Browser: Chrome 73 GrapesJS version: 0.14.57 I have remote storage configured using this call to grapesjs.init(): While I see the request to /load fire in the Network tab of Chrome's dev tools, I don't see any requests to /store, no matter how many changes I make in the editor. Is there a configuration...

DylanSp

Updating to the next release fixed this, I now see requests to to the /store endpoint. Thanks for the prompt fix!

DylanSp

I should also note that manually saving with editor.store() does send a request that I can see in the Network tab.

artf

Thanks for the report @DylanSp actually there is an issue with the listener. If the first load call fails (and I guess your /load endpoint is fake just like mine) it never starts tracking the editor changes so autosave doesn't work. It wil...

#1984Apr 26, 2019by AkibDeraiya1232 answers
0 reactions

Getting issue while click on edit option of image

Hey @artf , I see version release 0.14.57. In this version, you support to the image editor using this lib grapesjs-tui-image-editor.min.js?0.1.2. Previously, I used cropper.js for image editing. But it was not properly working fine. I see demo for image editing using grapesjs-tui-image-editor.min.js?0.1.2 it's workin...

artf

Please check the README file https://github.com/artf/grapesjs-tui-image-editor I mention this issue in the icons option and the example shows you exactly what to do

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.

Browse all topics