grapesjs icon indicating copy to clipboard operation
grapesjs copied to clipboard

Styles by ID in components

Open edwinjoel1984 opened this issue 7 years ago • 2 comments

How do I make the styles of the components I take them by id and not by class

edwinjoel1984 avatar Nov 29 '19 17:11 edwinjoel1984

You can toggle classes, this will change the style selector Schermata 2019-11-30 alle 00 12 32

artf avatar Nov 29 '19 23:11 artf

The main problem that i have is I'm trying to do a resize in a component that I made, but if I have Two Components equals, when I do the resize one of them the other do the same resize. So, I think that I would need manage the style of them by id and not by class.

This is my code: const buttonComponent = { name: "button-bk", data: { id: "button", label: Button, category: "Basic Components", draggable: true, content: , }, }; editor.BlockManager.add('button', buttonComponent); View Example https://cl.ly/c4bfaf626adc

edwinjoel1984 avatar Dec 02 '19 15:12 edwinjoel1984