Replies: 2 comments
-
I have made some progress but now I'm stuck I have defined my custom type
I load it via the plugins array and add it to the style manager
and also my custom blocks have the 'box-model' property as stylable, so when I select them the box model editor it actually shows. this kinda works, but when I update any of the inputs inside the box model editor, the css it produces for the target element is:
which is obviously not a valid css property,
As far as I can see there's something wrong with my Any help would be greatly appreciated!! |
Beta Was this translation helpful? Give feedback.
-
You can pass your style object to updateStyle instead of the string |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there, I want to create a custom propertyType with https://grapesjs.com/docs/api/style_manager.html#addtype
this would be a collection of inputs to control both margin and padding in the four directions; and visually I want it to be something like this:
I want to be able to type in each field, but also be able to drag to increase/decrease the value.
I want to only be able to type numbers, but margins should accept the 'auto' value that should be set via click on an 'auto' button.
I kinda know how to do all of this outside of grapes (the html + css using css grid; increasing the value by dragging with js; etc) but I cant't quite figure out how to get it into grapes.
Thanks !!
Beta Was this translation helpful? Give feedback.
All reactions