Cannot Update Style Manager Property Type to Slider in GrapesJS Studio #18
Unanswered
nomanaslam1696
asked this question in
Q&A
Replies: 1 comment
-
|
Yeah, we're missing the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to update the "width" property in my custom style manager sector to use the slider type in GrapesJS Studio, but it still displays as a number input instead of a slider.
export const loadStylingSectors = (editor) => { editor.on("load", () => { const sector = editor.StyleManager.addSector("sizes", { name: "Sizes", open: true, buildProps: ["width"], properties: [ { type: "slider", property: "width", defaults: 50, step: 1, max: 100, min: 0, units: ["%"], important: true }, ], }); }); };plugins: [ editor=> { loadComponents(editor); loadStylingSectors(editor); } ],I also checked editor.StyleManager.getType('slider'), and it returns { id: "slider" }, so the slider type exists.
However, it still renders as a number input instead of a slider.
Is there something overriding the UI in GrapesJS Studio?
Do I need to explicitly apply any styles for the slider?
@artf
@GrapesJSBot
Beta Was this translation helpful? Give feedback.
All reactions