GrapesJS Issues

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

3464 issues found

#2208August 21, 2019by zgeist2 answers
1 reactions

Button active state

Have problem with button active state If button already active, when click active state have unset Probably wrong logic here https://github.com/artf/grapesjs/blob/dev/src/panels/view/ButtonView.js#L142 How can I extend toogleActive method?

kerryj89

I'm having this same issue and the link @artf mentioned while it starts with active state it stops working when you click on another device. Edit: @zgeist Fixed it here https://github.com/artf/grapesjs/issues/3305#issuecomment-808323277

artf

I think the issue is just with the webpage preset (didn't have time to update) but is the same property described in getting started: https://grapesjs.com/docs/getting-started.html#style-manager You have to add the button with togglable: f...

#2207August 20, 2019by niisar3 answers
0 reactions

[BUG]: Can't drag component if there is some space on top/left with Mode Absolute

Given the following code example... Results in no ability to drag and drop elements to correct position using drag icon on the panel. See Fiddle for demonstration... https://jsfiddle.net/niisar/zc51gtnv/

pouyamiralayi

this is only for the drag icon, right? the manual dragging is fine. using the drag icon, it resets the position of the element from the top as it seems.

niisar

this is only for the drag icon, right? the manual dragging is fine.using the drag icon, it resets the position of the element from the top as it seems. Yes this is only for drag icon.

artf

Yeah the problem here is the different Event object based on the context. When you trigger the drag on the component itself the Event is in the context of the iframe (because the clicked element is in iframe) but component's buttons are ou...

#2206August 20, 2019by WebEtSolutions1 answer
0 reactions

Style value to "undefined !important"

Hi ! Little problem when I type a style property with important. When I clear the value of the field (like color type for exemple) value is set to "undefined !important". For fix this, on Property.getFullValue, you must check the value before add " !important" : if (value !== undefined && this.get('important')) { valu...

artf

Thanks @WebEtSolutions it'll be fixed in the next release

#2205August 20, 2019by inaLar3 answers
2 reactions

[QUESTION] Text component converted to Box after saving

I have a custom component when dropped inside a Text component (I am using a custom text component that extends the original text component) after saving and reloading the HTML/CSS I am experiencing the same problem - the text component converts to a Box. I use a custom attribute, but no matter the attribute the type...

inaLar

Hi! This is very useful information - about accessing the model this way instead the DOM. I will explore it. I still don't understand why the gjs-comp-selected class is stored in the innerHTML precisely when I drop the custom component ins...

inaLar

@pouyamiralayi, yes, I have done exactly the same and it is working, but also I've managed to use tagName (div, p, ... ) in the isComponent of an extended text component and this also works in my case. I will close the question now. Thank...

pouyamiralayi

do you define your custom type inside a plugin?

#2204August 20, 2019by pouyamiralayi1 answer
1 reactions

[Feature] custom processor callback for components generated from Vue

Hello there! i recently ran into this new awesome feature introduced here here you can have some processing done on the react generated element which is awesome. for the moment i am working on some third party components that use vue as their compiler. the current approach i am dealing with is as below that is working...

artf

mmm probably I didn't describe it correctly, especially with this: I need to correct it with So the point of this feature is simply to understand objects generated from JSX and transform them into GrapesJS component definition objects and...

#2203August 19, 2019by benvmatheson2 answers
1 reactions

[Enhancement] Possible configuration bloat

We had an issue with Grapes metadata (Components, Style, etc.) growing to the point it was causing issues on our end. After inspecting we noticed that the HTML/CSS grapes was outputting was less than 5k, but the Components/Style objects were storing at ~190k. After looking into the components, I noticed most of the da...

devgru

Consider using avoidDefaults flag, it reduces config footprint by removing these default values: https://github.com/artf/grapesjs/blob/c1fb490a73adefb0fa073f37bef4e6178d9321a8/src/editor/config/config.js#L131

artf

Consider using avoidDefaults flag, it reduces config footprint by removing these default values Correct

#2202August 19, 2019by Chaitwo2 answers
3 reactions

Remove an Image when on preview and show on editor

Hey, @artf I need help with a challenge I've been facing I want to hide images with src empty for particular class images in preview mode and show them on editor mode. I've tried this but it doesn't seem to work for some reason Thanks, Chaitu

artf

You can't just do $('.img[src=""]') GrapesJS components are not in the same context, are placed inside an iframe so you have to use the document from that iframe, eg.

pouyamiralayi

is your selector correct? As far as i know grapes will set background-image:url() instead of src.

#2201August 18, 2019by grant0073 answers
1 reactions

[Feature]: Allow scroll of the canvas if the device height exceeds the available height

Given the following code example... Results in no ability to scroll to top of canvas if editor display area is less than specified height of the device. See Fiddle for demonstration... https://jsfiddle.net/gstone007/0vq3o2jf/1/

ghost

Just add style overflow: auto to .gjs-cv-canvas__frames

artf

After exploring a bit more about this issue I'd suggest just not to exceed the canvas height with the device one. Unfortunately, currently, making any part of the canvas scrollable (solution suggested by @TheDiamondKing ) will lead to unex...

contentfree

@artf Is your comment still true? Does adding overflow: auto (especially in a "designer mode" / "absolute mode" canvas) still cause problems?

#2200August 17, 2019by GoodPHP3 answers
3 reactions

Customize your GrapesJS

Hi there, I will offer your my service of customizing your grapesJS editor to any result. I have experience about 3 years with GrapesJS and 9 years in Web developing. Example of my work: https://monosnap.com/file/MnXzYlIK5UVe3oVr8dqveDzZG7PVU8 Video: https://monosnap.com/file/Lw0E8VmGdsyWUGe8jsRII6i66P1urm Email: supp...

smik3

Oh I know that! What I was referring to is that if you try and use the index/block/component files from dist (ie unminified and easier to work from) they don't work outside of a node/webpack environment. On 19 Aug 2019, at 20:18, Pouya Mir...

inaLar

@smik3 , this is not a good practice, as it won't let you update GrapesJS easy in future. You better separate the custom code in js functions and whichever of them you need to use as a plugin, you can load. Or use node only for compilation...

Chaitwo

Hey, @GoodPHP I need help with a challenge I've been facing I want to hide images with src empty on preview mode and show them on editor mode i.e stop: preview. I've tried this but it doesn't seem to work for some reason Thanks, Chaitu