GrapesJS Issues

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

3464 issues found

#3296March 1, 2021by RaresVlaiduc2 answers
1 reactions

[QUESTION]: Multiple pages plugin

Hello there! I've seen some discussions about some sort of multiple pages plugin in here. Is this still a thing? Is there something done regarding this or should I start my own plugin? Thanks!

Ju99ernaut

I've made a simple one for indexedDB but it can also be adapted for other storage types https://github.com/Ju99ernaut/grapesjs-indexeddb-ui however I plan on deprecating it in favour of a new plugin that has other storage types built in, a...

artf

Yeah, it's still quite in progress (I have no ETA, unfortunately) but for sure the PageManager will be in the core.

#3295March 1, 2021by marcepoblet3 answers
0 reactions

BUG (v0.16.41): Button component with draggable property is not working properly

Version: v0.16.41 Are you able to reproduce the bug from the demo? [ ] Yes [ ] No What is the expected behavior? When we have a button with the property data-gjs-draggable in false, this button not should be dragged in the canvas. Describe the bug detailed StepsSet a button component with draggable property in falseDr...

artf

I guess you're doing something wrong, how do you create those components and their properties?? You shouldn't even see those attributes in the inspector.

marcepoblet

@artf In our codes we have not changed anything. The only difference is that we update the GrapesJs version. Before I had version v0.16.18 and it worked correctly, but now we update GrapesJs to v0.16.41 and it doesn't work for buttons.

marcepoblet

we set the properties with this: editor.getSelected().attributes.attributes["data-gjs-editable"] = 'false' editor.getSelected().attributes.attributes["data-gjs-copyable"] = 'false' editor.getSelected().attributes.attributes["data-gjs-dropp...

#3294February 27, 2021by server1023 answers
0 reactions

FEAT: Adding options to properties list array in style manager

Hi, How can I add buildProps to properties list such that when an option is selected, the properties of that option will be displayed An example of what I am trying to achieve on the flex property.

Ju99ernaut

I believe you can move the build props out of the properties list and still achieve what you're trying, the built in flex box related properties only show when a component has display: flex. It's also important to note that buildProps are...

server102

Thank you. I tried it but the grid properties are not working. Might have to implement it manually but am not sure on how best to approach the problem.

Ju99ernaut

There's no buildProps for grid properties so you'll have to build those from scratch, unfortunately docs don't have much info on custom properties probably you'll have to piece things together from the API reference https://grapesjs.com/do...

#3293February 26, 2021by eikerd1 answer
0 reactions

Blockmanager: adding custom class gjs-block-category / gjs-title DIVs

I have a list of categories, and I want to mark some with a different style depending on if they are required or not. so ideally i could add a class to the div with class 'gjs-title' so that it says 'gjs-title required-field' this.editor.BlockManager.getCategories(); returns an array of all my block-categories, but my...

artf

Hi @eikerd by checking the code, at the moment, I don't see any other way of customizing block category DOMs if not doing something on your own with the DOM (once blocks are rendered). I'll probably add the view to the category model in th...

#3292February 26, 2021by sudiptochoudhury2 answers
1 reactions

QUESTION: Is there a event per component before save which the component can listen to?

Much grateful to you for this library. Background: I am building an editor where I intend to define most of the components from an existing set of Vuejs components which I have developed earlier and use in my applications. Most of these are UI based simple and complex components. For example, I have simple vuejs compo...

Ju99ernaut

I'm not sure if such hooks exist per component but you can try to take advantage to the toHtml property of a component. It's already been discussed elsewhere so you search it in the issues as there are quite a few.

artf

Yeap, you can define your components with a custom toHTML/toJSON function (in model), in order to customize their output

#3291February 25, 2021by marcepoblet3 answers
4 reactions

BUG (v0.16.41): the duplicate icon from the icon toolbar is modifying the original element too

Version: v0.16.41 Are you able to reproduce the bug from the demo? [ ] Yes What is the expected behavior? The elements duplicated not should be impact the changes in the original element. Describe the bug detailed steps: select an element (text, image, etc)click on the duplicate icon from the toolbarmodify the new ele...

artf

Thanks for the report guys, I'm aware of the bug and it's already fixed in dev. I've just totally forgot to release it 😬 I'll try to release it today

devtechk

@artf Thanks a lot! you saved me a lot of work _ I was trying to debug this issue all this entire afternoon... then for casuality I've realized, checking npm that the 0.16.44 version was out... You saved man. Thank a lot! Donation, you des...

aadilmehrajbhat

Regression issue since "grapesjs": "0.16.34"

#3290February 25, 2021by marcepoblet2 answers
0 reactions

BUG: The changesCount parameter should be reset to zero when we undo the images

Version: v0.16.41 Are you able to reproduce the bug from the demo? [ ] No What is the expected behavior? The changesCount parameter should be reset to zero when we undo the images Describe the bug detailed Steps:add an imagedelete the imageundo the changes We should see the changesCount parameter should be reset to ze...

GayathriGuru

Hi! @marcepoblet can you please share the part of the code which you used to define the changesCount variable to get it incremented?

artf

Closing this as I don't see any substantial benefit for this functionality

#3289February 23, 2021by bgrand-ch3 answers
2 reactions

BUG: (0.16.41) Components have lost their styles

Version: 0.16.41 Are you able to reproduce the bug from the demo? [X] Yes [ ] No What is the expected behavior? 1) Copy selected parent component (container) to the clipboard. 2) Paste selected parent component (container) from the clipboard (into the same page or an other page). 3) All components keep ID styles and i...

artf

That because you've updated original commands with your versions (incorrectly). Indeed, if I remove your plugin from the demo everything works as expected. Please check the original copy and paste command, you should clone components befor...

artf

Just check the original commands https://github.com/artf/grapesjs/blob/dev/src/commands/view/CopyComponent.js https://github.com/artf/grapesjs/blob/dev/src/commands/view/PasteComponent.js

bgrand-ch

@artf Thanks for your answer. A link or an example or more explanations please? 😅

#3287February 23, 2021by RaresVlaiduc3 answers
1 reactions

QUESTION: Wrapper styling

First of all, congrats @artf for this amazing project 💯 I am currently working on a project and I wanted to ask if I can edit the wrapper (body) like I edit other components inside it. For example I would like to edit the padding of the wrapper as I do with the background-color. I've had a look over the configs but c...

artf

Yes @kuhelbeher, now the wrapper is created post plugins, so you can entirely extend it as any other component

artf

LE: I have found a way. I am overwritting the stylable array from getWrapper() but I'm not 100% sure this is the correct way. Can you confirm this? Yeah sure it's ok, but if you need, you can change the wrapper properties on init via mainC...

kuhelbeher

you can change the wrapper properties on init via mainConfig.domComponents.wrapper optionhttps://github.com/artf/grapesjs/blob/18b2f95b7f844578dc2b28d786b126013d155d9e/src/dom_components/config/config.js#L9 Hello, I've noticed that this op...